// // ShopCarModel.swift // ADHTuanCan // // Created by 敖德亨 on 2023/10/30. // import UIKit class ShopCarModel: MCBaseRequestModel { } class GetShoppingCarMsgResultMeal: MCBaseRequestModel { /// 购物车id var shopcartId : NSNumber? /// 购物时间id var shopcartTimeId : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/shopcart/getShopcartMsg" } } /// 购物车详情 class ShopMealMsgModel : MCBaseModel{ /// 菜品信息 var shopMealMsgVos : [ShopMealMsgDetailModel]? /// 供餐类型名称 var supplyType : String? } /// shopMealMsgVos class ShopMealMsgDetailModel : MCBaseModel{ /// 活动id var activityId : String? /// 单品/套餐,备注 var comment : String? /// 送达时间-结束 var deliveryEnd : String? /// 送达时间-开始 var deliveryStart : String? /// 折扣id var discountId : String? /// 非固定套餐-选品明细 var fixedFoods : String? /// 是否固定套餐,1是,0不是 var isFixed : String? /// 单品/套餐,1单品,2套餐 var isMeal : String? /// 套餐内菜品信息 var mealFoodMsgs : [MealFoodMsgModel]? /// 菜品/套餐id var shopMealId : NSNumber? /// 菜品/套餐id var mealId : NSNumber? /// 单品/套餐,1单品,2套餐 var mealType : String? /// 就餐人数 var numPeople : String? /// 最低就餐人数 var lowestNum : String? /// 原价 var originalPrice : String? /// 售价 var price : String? /// 时间id var shopcartId : NSNumber? /// 供餐类型名称 var supplyType : String? /// 图片 var link : String? /// var name : String? /// var isFistLine = false } //MARK: 获取购物车价格 class GetShoppingCarPriceRequestModel: MCBaseRequestModel { /// 购物车id var id : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/calculatePrice" } } /// 购物车详情 class ShopCarPriceDetailModel : MCBaseModel{ /// 优惠金额,优惠了多少金额 var discountAmount : String? /// 购物车id var shopcartId : NSNumber? /// 售价 var price : String? /// var mealPriceMsgs : [SaleDetailModel]? /// 原价 var originalPrice : String? } /// 购物车优惠信息 class SaleDetailModel : MCBaseModel{ /// 1优惠 2折扣 3活动 var showType : String? /// 优惠内容 var name : String? /// "打折/送/减 多少" var showAmount : String? } //MARK: 获取购物车价格 class EditorShoppingCarRequestModel: MCBaseRequestModel { /// 从购物车删除此菜品,未做修改则不传值 var del : String? /// 送餐时间ID var deliveryId : NSNumber? /// 购物车id var shopcartId : NSNumber? /// 就餐人数,未做修改则不传值 var numPeople : String? /// 时间id var shopcartTimeId : NSNumber? /// 菜品/套餐id var shopMealId : NSNumber? /// 单品/套餐,1单品,2套餐 var mealType : String? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/shopcart/update" } } //MARK: 获取默认地址 class CleanShopcarModel: MCBaseRequestModel { /// 购物车id var id : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/shopcart/emptyShopcart" } } //MARK: 获取默认地址 class GetDefAddressRequestModel: MCBaseRequestModel { /// 购物车id var shopcartId : NSNumber? override func requestMethod() -> MCHttpMethod { .get } override func requestUrl() -> String { "/app/usermsg/getDefAddress" } } //MARK: 通过购物车购买 class AddOrderModel: MCBaseRequestModel { /// 购物车id var shopcartId : NSNumber? /// 地址id var addressId : NSNumber? /// comment var 订单备注 : NSNumber? /// 支付方式 var payTypeId : NSNumber? /// 结算方式 var settleId : NSNumber? /// var userType : String? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/saveByShopcart" } } /// 获取订单ID class OrderIDmModel : MCBaseModel{ /// 优惠金额,优惠了多少金额 var orderId : NSNumber? /// 订单编号 var orderNo : String? /// 需不需要拉起支付,1需要,0不需要 var pullUp : String? } //MARK: 根据支付方式获取价格 class GetPriceWithTypeModel: MCBaseRequestModel { /// 购物车id var shopcartId : NSNumber? var settleId : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/getSettlePrice" } } /// 支付方式价格 class PriceWithTypeModel : MCBaseModel{ /// var price : String? } //MARK: 获取支付配置信息 class GetPayConfiguration: MCBaseRequestModel { /// var orderId : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/stripePay/create" } } /// 支付配置信息 class PayConfigurationModel : MCBaseModel{ /// var clientSecret : String? /// 商户名 var merchantDisplayName : String? ///用户ID var customerId : String? /// Ephemeral Key 密钥 var ephemeralKey : String? var publicKey : String? } //MARK: 获取结算方式/app/order/getSettleType class GetPaySettleTypeModel: MCBaseRequestModel { ///输入订单或购物车类型,类型,1普团,2白团 var type : String? override func requestMethod() -> MCHttpMethod { .get } override func requestUrl() -> String { "/app/order/getSettleType" } } /// 结算方式Model class PaySettleTypeModel : MCBaseModel{ /// id var id : NSNumber? var name : String? var isSelect = false } //MARK: 获取支付方式 class GetPayPaymentTypeModel: MCBaseRequestModel { ///输入订单或购物车类型,类型,1普团,2白团 var type : String? ///订单id,由订单列表拉起支付必传 var orderId : NSNumber? ///获取支付方式来源,1由购物车发起购买,2由订单列表拉起支付,3用户充值 var source : String? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/getPaymentType" } } /// 支付方式Model class PayMentTypeModel : MCBaseModel{ /// id var id : NSNumber? var name : String? var isSelect = false } //MARK: 获取从订单列表或订单详情拉起支付或密码支付 class GetIsStripePayModel: MCBaseRequestModel { /// 订单ID var orderId : NSNumber? /// 支付方式ID var payTypeId : NSNumber? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/pullOrderPay" } } class IsStripePayModel : MCBaseModel{ /// 订单ID var orderId : NSNumber? /// 需不需要拉起第三方支付,1需要,0不需要 var pullUp : String? } //MARK: 密码支付 class PSWPayRequestModel: MCBaseRequestModel { /// 订单ID var orderId : NSNumber? /// PSW var payPassword : String? override func requestMethod() -> MCHttpMethod { .post } override func requestUrl() -> String { "/app/order/passwordPayment" } } /// 支付成功显示Model class PaySuccessModel : MCBaseModel{ /// 金额 var money : String? /// 订单编号 var orderNum : String? /// 支付方式 var payTypeName : String? /// 支付时间 var time : String? }