//
|
// 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 ""
|
}
|
}
|
}
|