mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
initial swift data conversion
This commit is contained in:
parent
183924d4dc
commit
b2c72ae166
130 changed files with 2939 additions and 2269 deletions
40
Meshtastic/Model/UserEntity.swift
Normal file
40
Meshtastic/Model/UserEntity.swift
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// UserEntity.swift
|
||||
// Meshtastic
|
||||
//
|
||||
// SwiftData model for user information.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftData
|
||||
|
||||
@Model
|
||||
final class UserEntity {
|
||||
var hwDisplayName: String?
|
||||
var hwModel: String?
|
||||
var hwModelId: Int32 = 0
|
||||
var isLicensed: Bool = false
|
||||
var keyMatch: Bool = true
|
||||
var lastMessage: Date?
|
||||
var longName: String?
|
||||
var mute: Bool = false
|
||||
var newPublicKey: Data?
|
||||
var num: Int64 = 0
|
||||
var numString: String?
|
||||
var pkiEncrypted: Bool = false
|
||||
var publicKey: Data?
|
||||
var role: Int32 = 0
|
||||
var shortName: String?
|
||||
var unmessagable: Bool = false
|
||||
var userId: String?
|
||||
|
||||
@Relationship(inverse: \MessageEntity.fromUser)
|
||||
var sentMessages: [MessageEntity] = []
|
||||
|
||||
@Relationship(inverse: \MessageEntity.toUser)
|
||||
var receivedMessages: [MessageEntity] = []
|
||||
|
||||
var userNode: NodeInfoEntity?
|
||||
|
||||
init() {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue