Add Projects, Schedule, and Invite modules with home routing.
Migrate project management, schedule management, and photographer invitation flows from placeholders, including project image OSS upload and shared business models. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -203,38 +203,6 @@ struct TaskDetailOrder: Decodable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
/// 可关联订单实体,表示发布任务时可选择的订单。
|
||||
struct AvailableOrderResponse: Decodable, Identifiable, Hashable {
|
||||
var id: String { orderNumber }
|
||||
let projectName: String
|
||||
let orderNumber: String
|
||||
let orderStatus: Int
|
||||
let orderStatusLabel: String
|
||||
let payTime: String
|
||||
let userPhone: String
|
||||
|
||||
/// 可关联订单字段映射,兼容后端下划线命名。
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case projectName = "project_name"
|
||||
case orderNumber = "order_number"
|
||||
case orderStatus = "order_status"
|
||||
case orderStatusLabel = "order_status_label"
|
||||
case payTime = "pay_time"
|
||||
case userPhone = "user_phone"
|
||||
}
|
||||
|
||||
/// 宽松解码可关联订单字段。
|
||||
init(from decoder: Decoder) throws {
|
||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||
projectName = try container.decodeLossyString(forKey: .projectName)
|
||||
orderNumber = try container.decodeLossyString(forKey: .orderNumber)
|
||||
orderStatus = try container.decodeLossyInt(forKey: .orderStatus) ?? 0
|
||||
orderStatusLabel = try container.decodeLossyString(forKey: .orderStatusLabel)
|
||||
payTime = try container.decodeLossyString(forKey: .payTime)
|
||||
userPhone = try container.decodeLossyString(forKey: .userPhone)
|
||||
}
|
||||
}
|
||||
|
||||
/// 发布任务请求实体,描述提交给后端的新任务内容。
|
||||
struct AddTaskRequest: Encodable, Equatable {
|
||||
let scenicId: String
|
||||
|
||||
Reference in New Issue
Block a user