23 lines
474 B
Swift
23 lines
474 B
Swift
|
import Foundation
|
||
|
import GRDB
|
||
|
import Martin
|
||
|
import SwiftUI
|
||
|
|
||
|
// MARK: - Account
|
||
|
struct Account: DBStorable {
|
||
|
var bareJid: String
|
||
|
var pass: String
|
||
|
var isActive: Bool
|
||
|
var isTemp: Bool // account which is added by user, but not yet logged in
|
||
|
var id: String { bareJid }
|
||
|
}
|
||
|
|
||
|
extension Account: UniversalInputSelectionElement {
|
||
|
var text: String? { bareJid }
|
||
|
var icon: Image? { nil }
|
||
|
}
|
||
|
|
||
|
extension Account {
|
||
|
static let databaseTableName = "accounts"
|
||
|
}
|