jsdw_ios/QuickLocation/Model/EmergencyContactModel.swift

54 lines
1.0 KiB
Swift

//
// EmergencyContactModel.swift
// QuickLocation
//
// Created by on 2026/6/11.
//
import ObjectMapper
import RxDataSources
///
struct EmergencyContactListResponse: BaseModelProtocol {
//
var code: String?
//
var message: String?
//
var list: [EmergencyContactModel] = []
init?(map: Map) {}
mutating func mapping(map: Map) {
code <- map["code"]
message <- map["msg"]
list <- map["data"]
}
}
struct EmergencyContactModel: Mappable, Equatable {
var uuid: String = UUID().uuidString
///
var name: String = ""
var phone: String = ""
var ischecked: Bool = false
init?(map: Map) {
}
mutating func mapping(map: Map) {
name <- map["name"]
phone <- map["phone"]
ischecked <- map["ischecked"]
}
}
extension EmergencyContactModel: IdentifiableType {
public typealias Identity = String
public var identity: String {
return uuid
}
}