Files
OrderScheduling/OrderScheduling/HttpResponseModel/ResponseModel.swift
DDIsFriend b846be8803 update
2023-08-30 11:10:38 +08:00

308 lines
8.0 KiB
Swift

//
// ResponseModel.swift
// OrderScheduling
//
// Created by on 2023/8/7.
//
import Foundation
class ResponseModel<T:Decodable> : Decodable {
typealias data = T
var code : Int
var msg : String?
var data : T?
var time : Int
var success : Bool
}
class LoginDataModel : Decodable {
var accessToken : LoginDataAccessTokenModel
var refreshToken : LoginDataRefreshTokenModel
var additionalParameters : LoginDataAdditionalModel
public class LoginDataAccessTokenModel: Decodable {
var tokenValue : String
var issuedAt : Double?
var expiresAt : Double?
}
public class LoginDataRefreshTokenModel: Decodable {
var tokenValue : String
var issuedAt : Double?
var expiresAt : Double?
}
public class LoginDataAdditionalModel: Decodable {
var user_info : LoginDataAdditionalUserModel?
}
public class LoginDataAdditionalUserModel: Decodable {
var userId : Int
var phone : String
var name : String
var supplierName : String
var supplierType : Int
var supplierId : Int
var username : String
var userType : String
}
}
class OrderListDataModel: Decodable {
var brand : String?
var model : String?
var vehiclePointAddress : String
var vehiclePointLongitude : Double
var vehiclePointLatitude : Double
var vehiclePointRemark : String?
var destinationAddress : String?
var positionEnvironment : PositionEnvironmentModel?
var destinationLongitude : Double?
var destinationLatitude : Double?
var destinationRemark : String?
var appointTime : String?
var contractName : String
var taskServiceName : String
var taskOrderStatusString : String?
var taskOrderStatus : Int?
var orderCode : String
var createTime : String
var driverName : String?
var driverPhone : String?
var environmentPic : String?
var userOrderId : Int
var taskOrderId : Int
var taskFlowId : Int
var userPhone : String
var auditFailReason : String?
var isSupplierSettle : SupplierSettleModel?
var supplierSettleRatio : SupplierSettleRatioModel?
class SupplierSettleModel : Decodable {
var code : IsSupplierSettleEnum
var label : String
}
class SupplierSettleRatioModel : Decodable {
var code : SupplierSettleRatioEnum
var label : String
}
class PositionEnvironmentModel : Decodable {
var code : positionEnvironment
var label : String
}
enum IsSupplierSettleEnum : Int,Decodable {
case NO = 0
case YES = 1
}
enum SupplierSettleRatioEnum : Int, Decodable {
case NO_SETTLE = 0
case ALL_SETTLE = 1
case DROP_SETTLE = 2
case SERVICE_FAIL_SETTLE = 3
case TRAIL_CAR_SETTLE = 4
}
enum positionEnvironment : Int,Decodable {
case ground = 1
case elevated_road = 2
case expressway = 3
case tunnel = 4
case bridge = 5
case underground = 6
case high_rise_car_park = 7
case crane_rescue = 8
case wading = 9
}
}
enum VehicleStatusCodeEnum : Int, Decodable {
case offLine = 1
case onLine = 2
case lostConnection = 3
case leisure = 4
case busy = 6
case BuyBusy = 5
}
class VehicleStatusModel : Decodable {
var code : VehicleStatusCodeEnum
var label : String
}
class OnlineStatusModel : Decodable {
var code : OnlineStatusCodeEnum
var label : String
enum OnlineStatusCodeEnum : Int, Decodable {
case offLine = 1
case onLine = 2
case lostConnection = 3
case leisure = 4
case busy = 6
case BuyBusy = 5
}
}
class DispatchVehicleListDataModel : Decodable {
var driverId : Int
var vehicleId : Int
var vehicleName : String?
var driverName : String?
var driverPhone : String?
var lon : String?
var lat : String?
var vehicleStatus : VehicleStatusModel
var onlineStatus : OnlineStatusModel
var distance : Double?
}
class ToDoMessageCountDataModel : Decodable {
var messageCount : Int
var toDoCount : Int
}
public class VehicleMonitorListDataModel : Decodable {
var vehicleMonitorCount : VehicleMonitorListCountModel
var rosterList : [ItemModel]
var onLineList : [ItemModel]
var lostConnectionList : [ItemModel]
var leisureList : [ItemModel]
var busyList : [ItemModel]
var alarmList : [ItemModel]
class VehicleMonitorListCountModel: Decodable {
var rosterCount : Int
var onLineCount : Int
var lostConnectionCount : Int
var leisureCount : Int
var busyCount : Int
var alarmCount : Int
}
public class ItemModel : Decodable {
var vehicleId : Int?
var vehicleName : String?
var driverId : Int
var driverName : String
var driverPhone : String
var vehicleType : String?
var terminalType : TerminalTypeEnum?
var vehicleStatus : VehicleStatusModel?
var onlineStatus : OnlineStatusModel?
var alarmType : AlarmType?
var rosterStartTime : String?
var rosterEndTime : String?
var lat : String?
var lon : String?
var orderCode : String?
var serviceName : String?
var taskStatusString : String?
var workingCount : Int?
var isSelected : Bool? = false
public enum TerminalTypeEnum : String,Decodable {
case APP = "APP"
case GPS = "GPS"
}
public class AlarmType : Decodable {
var code : AlarmTypeEnum
var label : String
}
public enum AlarmTypeEnum : Int,Decodable {
case dropped = 1
case busy = 2
case empty_shift = 3
}
}
}
public class OrderPhotoListDataModel : Decodable {
var taskStatus : Int
var taskStatusString : String
var photoList : [PhotoList]
class PhotoList : Decodable {
var tag : String
var imageTitle : String
var photoUrl : String?
var uploadImage : Data?
var taskStatus : Int?
}
}
public class GeneralInfoDataModel : Decodable {
var userId : Int
var icon : String
var phone : String
var supplierId : Int
var supplierName : String
var vehicleCount : Int
var driverCount : Int
}
public class DispatchAppH5UrlDataModel : Decodable {
var todoList : String?
var workOrderReconciliation : String
var vehicleManage : String
var driverManage : String
var invoicingNotify : String
var reporting : String
var supplySettlement : String
var workOrderDetail : String
var trainDocment : String
var docmentList : String
}
public class VersionCheckDataModel : Decodable {
var id : Int
var appVersion : String
var update : UpdateModel
var appType : TypeModel
class UpdateModel : Decodable {
var code : UpdateEnum
var label : String
}
class TypeModel : Decodable {
var code : AppTypeEnum
var label : String
}
enum UpdateEnum : Int,Decodable {
case NO = 0
case YES = 1
}
enum AppTypeEnum : Int,Decodable {
case app_type_1 = 1
case app_type_2 = 2
case app_type_3 = 3
case app_type_4 = 4
case app_type_5 = 5
}
var updateTime : String?
var createTime : String?
var description : String?
}
public class MessageReminderListDataModel : Decodable {
var id : Int
var msgType : MsgType
class MsgType : Decodable {
var code : MsgTypeEnum
var label : String
}
enum MsgTypeEnum : Int,Decodable {
case DEPARTURE_REMINDER = 1
case CUSTOMER_REMINDER = 2
}
var title : String
var titleContent : String
var titleColor : String
var content : String?
var imgPath : String?
var createTime : String
var hasRead : HasRead
class HasRead : Decodable {
var code : HasReadEnum
var label : String
}
enum HasReadEnum : Int,Decodable {
case NO = 0
case YES = 1
}
}