- Fixed App Store icon display with ios-marketing idiom - Added iPad orientation support for multitasking - Added UILaunchScreen for iPad requirements - Removed unused BLE permissions and files from build Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
1.6 KiB
Swift
47 lines
1.6 KiB
Swift
import Foundation
|
|
|
|
struct ServicePoint: Identifiable {
|
|
let id: Int
|
|
let businessId: Int
|
|
let name: String
|
|
let typeId: Int
|
|
let typeName: String
|
|
let code: String
|
|
let description: String
|
|
let sortOrder: Int
|
|
let isActive: Bool
|
|
let isClosedToNewMembers: Bool
|
|
let beaconId: Int?
|
|
let assignedByUserId: Int?
|
|
let createdAt: Date?
|
|
let updatedAt: Date?
|
|
|
|
init(json: [String: Any]) {
|
|
id = Beacon.parseInt(json["ID"] ?? json["ServicePointID"]) ?? 0
|
|
businessId = Beacon.parseInt(json["BusinessID"]) ?? 0
|
|
name = (json["Name"] as? String) ?? (json["ServicePointName"] as? String) ?? ""
|
|
typeId = Beacon.parseInt(json["TypeID"] ?? json["ServicePointTypeID"]) ?? 0
|
|
typeName = (json["TypeName"] as? String) ?? ""
|
|
code = (json["Code"] as? String) ?? ""
|
|
description = (json["Description"] as? String) ?? ""
|
|
sortOrder = Beacon.parseInt(json["SortOrder"]) ?? 0
|
|
isActive = Beacon.parseBool(json["IsActive"]) ?? true
|
|
isClosedToNewMembers = Beacon.parseBool(json["IsClosedToNewMembers"]) ?? false
|
|
beaconId = Beacon.parseInt(json["BeaconID"])
|
|
assignedByUserId = Beacon.parseInt(json["AssignedByUserID"])
|
|
createdAt = Beacon.parseDate(json["CreatedAt"])
|
|
updatedAt = Beacon.parseDate(json["UpdatedAt"])
|
|
}
|
|
}
|
|
|
|
struct ServicePointType: Identifiable {
|
|
let id: Int
|
|
let name: String
|
|
let sortOrder: Int
|
|
|
|
init(json: [String: Any]) {
|
|
id = Beacon.parseInt(json["ID"]) ?? 0
|
|
name = (json["Name"] as? String) ?? ""
|
|
sortOrder = Beacon.parseInt(json["SortOrder"]) ?? 0
|
|
}
|
|
}
|