2017-07-11 05:54:00 +02:00
|
|
|
//
|
|
|
|
// Author+Database.swift
|
|
|
|
// Database
|
|
|
|
//
|
|
|
|
// Created by Brent Simmons on 7/8/17.
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
2017-07-12 22:25:10 +02:00
|
|
|
import Data
|
|
|
|
import RSDatabase
|
2017-07-11 05:54:00 +02:00
|
|
|
|
|
|
|
extension Author {
|
|
|
|
|
2017-07-12 22:25:10 +02:00
|
|
|
init?(row: FMResultSet) {
|
2017-07-11 05:54:00 +02:00
|
|
|
|
2017-07-13 22:38:47 +02:00
|
|
|
let databaseID = row.string(forColumn: DatabaseKey.databaseID)
|
2017-07-12 22:25:10 +02:00
|
|
|
let name = row.string(forColumn: DatabaseKey.name)
|
|
|
|
let url = row.string(forColumn: DatabaseKey.url)
|
|
|
|
let avatarURL = row.string(forColumn: DatabaseKey.avatarURL)
|
|
|
|
let emailAddress = row.string(forColumn: DatabaseKey.emailAddress)
|
2017-07-11 05:54:00 +02:00
|
|
|
|
2017-07-13 22:38:47 +02:00
|
|
|
self.init(databaseID: databaseID, name: name, url: url, avatarURL: avatarURL, emailAddress: emailAddress)
|
2017-07-11 05:54:00 +02:00
|
|
|
}
|
|
|
|
}
|