2017-07-12 22:25:10 +02:00
|
|
|
|
//
|
|
|
|
|
// AccountInfo.swift
|
|
|
|
|
// Database
|
|
|
|
|
//
|
|
|
|
|
// Created by Brent Simmons on 7/3/17.
|
|
|
|
|
// Copyright © 2017 Ranchero Software. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import Foundation
|
2017-09-08 05:51:51 +02:00
|
|
|
|
|
2017-09-10 03:46:58 +02:00
|
|
|
|
// This is used by an Account that needs to store extra info.
|
|
|
|
|
// It’s stored as a binary plist in the database.
|
|
|
|
|
|
2017-09-08 06:00:30 +02:00
|
|
|
|
public struct AccountInfo: Equatable {
|
|
|
|
|
|
2017-09-10 03:46:58 +02:00
|
|
|
|
var plist: [String: AnyObject]?
|
2017-09-08 06:00:30 +02:00
|
|
|
|
|
2017-09-10 03:46:58 +02:00
|
|
|
|
init(plist: [String: AnyObject]) {
|
|
|
|
|
|
|
|
|
|
self.plist = plist
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-08 06:00:30 +02:00
|
|
|
|
public static func ==(lhs: AccountInfo, rhs: AccountInfo) -> Bool {
|
|
|
|
|
|
|
|
|
|
return true // TODO
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-12 22:25:10 +02:00
|
|
|
|
|
2017-08-21 07:43:46 +02:00
|
|
|
|
//func accountInfoWithRow(_ row: FMResultSet) -> AccountInfo? {
|
|
|
|
|
//
|
|
|
|
|
// guard let rawAccountInfo = row.data(forColumn: DatabaseKey.accountInfo) else {
|
|
|
|
|
// return nil
|
|
|
|
|
// }
|
|
|
|
|
// return propertyList(withData: rawAccountInfo) as? AccountInfo
|
|
|
|
|
//}
|
|
|
|
|
|