20 lines
359 B
Swift
20 lines
359 B
Swift
|
import Foundation
|
||
|
import GRDB
|
||
|
|
||
|
enum ConversationType: Int, Codable, DatabaseValueConvertible {
|
||
|
case chat = 0
|
||
|
case room = 1
|
||
|
case channel = 2
|
||
|
}
|
||
|
|
||
|
struct Chat: DBStorable {
|
||
|
static let databaseTableName = "chats"
|
||
|
|
||
|
var id: String
|
||
|
var account: String
|
||
|
var participant: String
|
||
|
var type: ConversationType
|
||
|
}
|
||
|
|
||
|
extension Chat: Equatable {}
|