another.im-ios/ConversationsClassic/AppCore/Models/Message.swift

31 lines
572 B
Swift
Raw Normal View History

2024-06-19 15:15:27 +00:00
import Foundation
import GRDB
enum MessageType: String, Codable, DatabaseValueConvertible {
case text
case image
case video
case audio
case file
case location
}
struct Message: DBStorable, Equatable {
static let databaseTableName = "messages"
let id: String
let chatId: String
let fromJid: String
let toJid: String
let timestamp: Date
let body: String?
// var isReaded: Bool
// let subject: String?
// let threadId: String?
// let errorType: String?
var type: MessageType {
.text
}
}