SetMealModel.swift 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. //
  2. // SetMealModel.swift
  3. // ADHTuanCan
  4. //
  5. // Created by 敖德亨 on 2023/10/26.
  6. //
  7. import UIKit
  8. class SetMealModel: MCBaseRequestModel {
  9. }
  10. //MARK: 获取套餐餐品详情
  11. class GetSetMealDetailRequestModel: MCBaseRequestModel {
  12. /// 菜品/套餐id
  13. var mealId : NSNumber?
  14. /// 菜品类型,1为单品,2为套餐
  15. var mealType : String?
  16. /// 菜品分类
  17. var runTypeId : String?
  18. /// 供餐类型(早餐、中餐、晚餐)
  19. var supplyTypeId : String?
  20. override func requestMethod() -> MCHttpMethod {
  21. .post
  22. }
  23. override func requestUrl() -> String {
  24. "/app/meal/getMealMsg"
  25. }
  26. }
  27. /// 套餐详情
  28. class SetMealDetailModel : MCBaseModel{
  29. /// 活动id
  30. var activityId : String?
  31. /// 套餐类型,1普团 2白团
  32. var isGeneral : String?
  33. /// 折扣id
  34. var discountId : String?
  35. /// 是否固定套餐,1是,0不是
  36. var isFixed : String?
  37. /// 封面图片路径
  38. var link : String?
  39. /// 套餐内菜品信息
  40. var mealFoodMsgs : [MealFoodMsgModel]?
  41. /// 菜品/套餐id
  42. var mealId : NSNumber?
  43. /// 非固定套餐规则
  44. var mealPrices : [MealPricesModel]?
  45. /// 菜品类型,1为单品,2为套餐
  46. var mealType : String?
  47. /// 菜品名称
  48. var nameCn : String?
  49. /// 菜品名称
  50. var nameEn : String?
  51. /// 菜品名称
  52. var name : String?
  53. /// 下单须知-中文
  54. var noticeCn : String?
  55. /// 下单须知-英文
  56. var noticeEn : String?
  57. /// 价格
  58. var price : String?
  59. /// 菜品分类
  60. var runTypeId : String?
  61. /// 供餐类型(早餐、中餐、晚餐)
  62. var supplyTypeId : String?
  63. /// 卖点
  64. var sellingPoints : String?
  65. /// 卖点
  66. var sellingPointsEn : String?
  67. /// 卖点
  68. var sellingPointsCn : String?
  69. /// 评分
  70. var score : String?
  71. /// 特色
  72. var specialtyCn : String?
  73. /// 特色
  74. var specialtyEn : String?
  75. /// 特色
  76. var specialty : String?
  77. /// 介绍-中文-富文本
  78. var introduce : String?
  79. /// 介绍-中文-富文本
  80. var introduceCn : String?
  81. /// 介绍-中文-富文本
  82. var introduceEn : String?
  83. /// 最低用餐人数
  84. var lowestNum : String?
  85. }
  86. class MealPricesModel : MCBaseModel{
  87. /// 要求数量
  88. var quantity : String?
  89. /// 金额
  90. var amount : String?
  91. }
  92. /// 套餐包含餐品
  93. class MealFoodMsgModel : MCBaseModel{
  94. /// 附件id
  95. var attachId : String?
  96. /// 创建时间
  97. var createTime : String?
  98. /// 创建人Id
  99. var createUserId : String?
  100. /// 创建人
  101. var createUserName : String?
  102. /// id
  103. var id : NSNumber?
  104. /// 0为未删除,1为已删除
  105. var isDelete : String?
  106. /// 附件路径
  107. var link : String?
  108. /// 菜品名称
  109. var name : String?
  110. /// 菜品名称
  111. var nameCn : String?
  112. /// 菜品名称
  113. var nameEn : String?
  114. /// 可替换菜品池Id,设置可替换菜品时设置此值
  115. var replacePoolId : NSNumber?
  116. /// 替换菜品ID
  117. var replaceId : NSNumber?
  118. /// 状态,1禁用,0启用
  119. var status : String?
  120. /// 更新时间
  121. var updateTime : String?
  122. /// 更新人Id
  123. var updateUserId : String?
  124. /// 更新人
  125. var updateUserName : String?
  126. /// 备注
  127. var comment : String?
  128. /// 状态,false未选中,true选中
  129. var selected = false
  130. }
  131. /// 套餐包含餐品
  132. class MealFoodMsgUpModel : MCBaseModel{
  133. /// 更新人
  134. var comment : String?
  135. /// 更新人
  136. var id : NSNumber?
  137. /// 更新人
  138. var replaceId : NSNumber?
  139. // comment 菜品备注 false
  140. // string
  141. // id 菜品id false
  142. // integer
  143. // replaceId 替换菜品id
  144. }
  145. //MARK: 获取配送时段
  146. class GetDeliveryTimeRequestModel: MCBaseRequestModel {
  147. ///购物车时间id
  148. var id : NSNumber?
  149. override func requestMethod() -> MCHttpMethod {
  150. .post
  151. }
  152. override func requestUrl() -> String {
  153. "/app/meal/getSupplyTime"
  154. }
  155. }
  156. class DeliveryTimeModel : MCBaseModel{
  157. /// 创建时间
  158. var createTime : String?
  159. /// 创建人id
  160. var createUserId : String?
  161. /// 创建人
  162. var createUserName : String?
  163. /// 结束时间
  164. var endTime : String?
  165. /// id
  166. var id : NSNumber?
  167. /// 0为未删除,1为已删除
  168. var isDelete : String?
  169. /// 时段配送人员人数 为0置灰
  170. var quota : String?
  171. /// 排序
  172. var sort : String?
  173. /// 开始时间
  174. var startTime : String?
  175. /// 状态,1禁用,0启用
  176. var status : String?
  177. /// 排序
  178. var updateTime : String?
  179. /// 修改人
  180. var updateUserId : String?
  181. /// 更新人
  182. var updateUserName : String?
  183. /// 状态,false未选中,true选中
  184. var selected = false
  185. }
  186. //MARK: 加入购物车
  187. class AddToshoppingCartModel: MCBaseRequestModel {
  188. /// 活动id
  189. var activityId : String?
  190. /// 备注
  191. var comment : String?
  192. /// 送达时间-结束
  193. var deliveryEnd : String?
  194. /// 送达时间-开始
  195. var deliveryStart : String?
  196. /// 折扣id
  197. var discountId : String?
  198. // /// 非固定套餐-选品明细,取选择菜品的主键id
  199. // var fixedFoods : [String]?
  200. /// 是否固定套餐,1是,0不是
  201. var isFixed : String?
  202. /// 套餐类型,1普团 2白团
  203. var isGeneral : String?
  204. /// 套餐内菜品信息
  205. var mealFoodMsgs : [MealFoodMsgModel]?
  206. /// 菜品/套餐id
  207. var mealId : NSNumber?
  208. /// 单品/套餐,1单品,2套餐
  209. var mealType : String?
  210. /// 就餐人数
  211. var numPeople : String?
  212. /// 运营id
  213. var runTypeId : String?
  214. /// 供餐类型id
  215. var supplyTypeId : String?
  216. /// 购物车id
  217. var shopcartId : NSNumber?
  218. /// 时间id
  219. var shopcartTimeId : NSNumber?
  220. /// 时间
  221. var shopcartTime : String?
  222. /// 套餐内菜品信息
  223. var fixedFoods : [NSNumber]?
  224. ///
  225. var deliveryId : NSNumber?
  226. override func requestMethod() -> MCHttpMethod {
  227. .post
  228. }
  229. override func requestUrl() -> String {
  230. "/app/shopcart/insert"
  231. }
  232. }
  233. //MARK: 获取配送时段
  234. class GetReplaceFoodRequestModel: MCBaseRequestModel {
  235. /// 菜品池id
  236. var poolId : NSNumber?
  237. override func requestMethod() -> MCHttpMethod {
  238. .get
  239. }
  240. override func requestUrl() -> String {
  241. "/app/meal/getReplaceFood"
  242. }
  243. }
  244. //MARK: check评论
  245. class GetEvaluateForMealList: MCBaseRequestModel {
  246. ///当前页
  247. var current : Int?
  248. ///菜品ID
  249. var mealId : NSNumber?
  250. var size : String? = "10"
  251. override func requestMethod() -> MCHttpMethod {
  252. .post
  253. }
  254. override func requestUrl() -> String {
  255. "/app/meal/pageMealPraise"
  256. }
  257. }
  258. /// 菜品评论
  259. class MealEvaluateListModel: MCBaseRequestModel {
  260. /// 人员头像
  261. var avatar : String?
  262. /// 评价详情
  263. var comment : String?
  264. /// 评价详情
  265. var links : [String]?
  266. /// 评价人
  267. var name : String?
  268. /// 评价时间
  269. var praiseTime : String?
  270. /// 评分
  271. var score : String?
  272. }