实现权限驱动的首页 Tab 并对齐 Android
This commit is contained in:
38
suixinkan/Features/Home/Models/LocationModels.swift
Normal file
38
suixinkan/Features/Home/Models/LocationModels.swift
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// LocationModels.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// 位置上报详情,对齐 Android `LocationDetailResponse`。
|
||||
struct LocationDetailResponse: Decodable, Sendable {
|
||||
let status: Int
|
||||
let needReport: Bool
|
||||
let expireTime: Int64
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case status
|
||||
case needReport = "need_report"
|
||||
case expireTime = "expire_time"
|
||||
}
|
||||
|
||||
init(status: Int = 0, needReport: Bool = true, expireTime: Int64 = 0) {
|
||||
self.status = status
|
||||
self.needReport = needReport
|
||||
self.expireTime = expireTime
|
||||
}
|
||||
}
|
||||
|
||||
/// 位置上报结果,对齐 Android `LocationReportResponse`。
|
||||
struct LocationReportResponse: Decodable, Sendable {
|
||||
let staffId: String
|
||||
let expired: Int64
|
||||
let status: Int
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case staffId = "staff_id"
|
||||
case expired
|
||||
case status
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user