宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
//
//  Enums.swift
//  OKProject
//
//  Created by 无故事王国 on 2022/2/10.
//  Copyright © 2022 yangwang. All rights reserved.
//
 
import Foundation
import HandyJSON
import UIKit
 
enum CouponDiscountType:Int,HandyJSONEnum{
    case discount = 1 //抵扣
    case fullMinus = 2 //满减
}
 
//enum UserType:Int,HandyJSONEnum {
//    case usual = 0 //通用
//    case special = 1 //快车
//    case taxi = 2 //出租车
//    case intercity = 3 //城际
//    case expressSamecity = 4 //小件物流-同城
//    case expressOthercity = 5 // 小件物流-跨城
//    case charter = 6 //包车
//    case custom = 7 //95128电召
//    case scenic = 8 //景区直通车
//    case plane = 9 //机场专线
//    case offical = 10 //公务用车
//}
 
 
    /// 出行方式 /// 业务类型(1=快车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车)
    enum OrderType: Int,HandyJSONEnum{
        // 出租车
        case taxi = 2
        /// 快车
        case special = 1
        /// 跨城
        case travel = 3
        /// 同城物流
        case cityLogistics = 4
        /// 跨城物流
        case acrossLogistics = 5
        /// 包车
        case charter = 6
        /// 95128电召
        case custom = 7
        /// 景区直通车
        case scenic = 8
        /// 机场专线
        case plane = 9
        ///公务用车
        case offical = 10
    }
 
enum DiscountType:Int,HandyJSONEnum{
    case numberOfDiscounts = 1 //打折次数卡
    case dicountCard = 2 //优惠卡
    case numberCard = 3 //次数卡
    case discountDayCard = 4 // 打折天数卡
    case expressCard = 5 //物流打折卡
    case expressPaket = 6 //物流优惠包
}
 
enum MerchantAudit:Int,HandyJSONEnum{
    case none = 0
    case waiting = 1
    case agreent = 2
    case reject = 3
}
 
enum LimitState:Int,HandyJSONEnum{
    case normal = 1 //正常
    case freeze = 2 //冻结
    case delete = 3 //删除
 
    var rawStr:String{
        switch self {
            case .freeze:
                return "已冻结"
            case .delete:
                return "已删除"
            default:
                return ""
        }
    }
}
 
enum ActiveStatus:Int,HandyJSONEnum{
    case ongoing = 1
    case end = 2
}
 
enum MerchantCouponType:Int,HandyJSONEnum{
    case coupon = 1 //优惠券
    case goods = 2 //商品券
}
 
enum CouponDataType:Int,HandyJSONEnum{
    case coupon = 1 //优惠券
    case card = 2 //打车卡
}
 
enum CouponStateType:Int,HandyJSONEnum{
    case unuse = 1 //未使用
    case used = 2 //已使用
    case overdue = 3 //过期
}
 
enum CommonStyle:Int,HandyJSONEnum{
    case rent = 1
    case sell = 2
    case job = 3
}
 
enum PublishState:Int,HandyJSONEnum,Codable{
    ///待审核
    case review = 1
    ///已上架
    case onShelf = 2
    ///已下架
    case takeDown = 3
    ///审核通过待上架
    case waitOnShelf = 4
    ///拒绝
    case reject = 5
    ///删除
    case del = 6
 
    var rawStr:String{
        switch self {
            case .del:return "已删除"
            case .onShelf:return "已上架"
            case .takeDown:return "已下架"
            case .waitOnShelf:return "待上架"
            case .reject:return "已拒绝"
            case .review:return "审核中"
        }
    }
}
 
enum JobState:Int,HandyJSONEnum{
    case review = 1 //待上架
    case onShelf = 2 //已上架
    case close = 3 //关闭
    case del = 6 //删除
}
 
enum UserAuthorType:Int,HandyJSONEnum,Codable{
    case user = 1 //用户
    case driver = 2 //司机
    case business = 3 //企业
}
 
 
enum EnterpriseAuthStatus:Int,HandyJSONEnum{
    case none = -1
    case Pending = 0
    case Review = 1
    case Pass = 2
    case Reject = 3
 
    var rawString:String{
        switch self {
            case .Pending:return "待提交"
            case .Review:return "待审核"
            case .Pass:return "通过"
            case .Reject:return "拒绝"
            case .none:return "--"
        }
    }
}
 
enum GenderType:Int,HandyJSONEnum{
    case man = 1
    case woman = 2
 
    var rawString:String{
        switch self{
            case .man:return "男"
            case .woman:return "女"
        }
    }
}
 
enum CalType:Int,HandyJSONEnum{
    case Single = 1
    case Charter = 2
    
    var rawString:String{
        switch self{
        case .Single:return "单程计费"
        case .Charter:return "包车计费"
        }
    }
}
 
enum LinesType:Int,HandyJSONEnum{
    case none = -1
    case pending = 0
    case pass = 1
    case reject = 2
 
    var rawString:String{
        switch self{
            case .pass:return "已处理"
            case .reject:return "已拒绝"
            case .pending:return "待处理"
            case .none:return "未知"
        }
    }
    var rawTextColor:UIColor{
        switch self{
            case .pass:return UIColor(hexString: "#626262")!
            case .reject:return UIColor.red
            case .pending:return UIColor(hexString: "#45B494")!
            case .none:return UIColor(hexString: "#626262")!
        }
    }
}
 
 
enum OfficalPaymentType:Int,HandyJSONEnum{
    //1=自费,2=企业支付)
    case none = 0
    case selfPay = 1
    case company = 2
    
    var rawStr:String{
        switch self{
        case .selfPay:return "自费"
        case .company:return "企业支付"
        case .none:return "未知"
        }
    }
}
 
enum OrderAuthStatus:Int,HandyJSONEnum{
    case cancel = -2 //取消单
    case normal = -1 //正常订单
    case review = 0 //审核中
    case pass = 1 //通过
    case reject = 2 //拒绝
    
    var rawStr:String{
        switch self{
        case .review:return "审核中"
        case .reject:return "已拒绝"
        default:return ""
        }
    }
}