Bark/Model/Message.swift
2021-10-12 16:02:34 +08:00

34 lines
791 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Message.swift
// Bark
//
// Created by huangfeng on 2020/5/25.
// Copyright © 2020 Fin. All rights reserved.
//
import IceCream
import RealmSwift
import UIKit
class Message: Object {
@objc dynamic var id = NSUUID().uuidString
@objc dynamic var title: String?
@objc dynamic var body: String?
@objc dynamic var url: String?
@objc dynamic var group: String?
@objc dynamic var createDate: Date?
// true IceCream
@objc dynamic var isDeleted = false
override class func primaryKey() -> String? {
return "id"
}
override class func indexedProperties() -> [String] {
return ["group", "createDate"]
}
}
extension Message: CKRecordConvertible {}
extension Message: CKRecordRecoverable {}