123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- //
- // 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?
- }
|