TCHomeGetDataModel.swift 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397
  1. //
  2. // TCHomeGetDataModel.swift
  3. // ADHTuanCan
  4. //
  5. // Created by 敖德亨 on 2023/10/1.
  6. //
  7. import UIKit
  8. class TCHomeGetDataModel: MCBaseRequestModel {
  9. }
  10. //MARK: 获取供餐类型和供餐分类 获取早中晚ID
  11. class HomeGetRunAndSupply: MCBaseRequestModel {
  12. /// 套餐类型,1普团,2白团
  13. var mealType : String?
  14. override func requestMethod() -> MCHttpMethod {
  15. .get
  16. }
  17. override func requestUrl() -> String {
  18. "/app/meal/getRunAndSupply"
  19. }
  20. }
  21. /// 供给类型列表(早中晚)
  22. class SupplyTypeListModel : MCBaseModel{
  23. var runTypeList : [RunTypeModel]?
  24. var supplyTypeList : [SupplyTypeModel]?
  25. }
  26. /// 供给类型(早中晚)
  27. class SupplyTypeModel : MCBaseModel{
  28. /// ID
  29. var id : String?
  30. /// 默认false
  31. var isDelete : Bool = false
  32. /// 中文名
  33. var name : String?
  34. /// 英文名
  35. var nameEn : String?
  36. }
  37. /// 供给类型(套餐部分)
  38. class RunTypeModel : MCBaseModel{
  39. /// 创建时间
  40. var createTime : String?
  41. /// 创建人id
  42. var createUserId : String?
  43. /// 创建人
  44. var createUserName : String?
  45. /// 主键
  46. var id : String?
  47. /// 0为未删除,1为已删除
  48. var isDelete : String?
  49. /// 英文名
  50. var nameEn : String?
  51. /// 中文名
  52. var nameCn : String?
  53. /// name
  54. var name : String?
  55. /// 排序
  56. var sort : String?
  57. /// 状态,1禁用,0启用
  58. var status : String?
  59. /// 类型,1,普团 2,白团
  60. var updateTime : String?
  61. /// 修改人
  62. var updateUserId : String?
  63. /// 更新人
  64. var updateUserName : String?
  65. }
  66. /// 获取不同类型(早中晚)的餐食
  67. class GetMealWithSupplyTypeModel: MCBaseRequestModel {
  68. /// 当前页
  69. var current : Int?
  70. /// 套餐类型,1普团 2白团
  71. var isGeneral : String?
  72. /// 菜品分类
  73. var runTypeId : String?
  74. /// 每页的数量
  75. var size = "10"
  76. /// 供餐类型(早餐、中餐、晚餐)
  77. var supplyTypeId : String?
  78. ///对应时间段下的餐品
  79. var shopcartTime : String?
  80. ///搜索内容
  81. var mealName : String?
  82. override func requestMethod() -> MCHttpMethod {
  83. .post
  84. }
  85. override func requestUrl() -> String {
  86. "/app/meal/pageMeal"
  87. }
  88. }
  89. class HomeFoodDetailModel : MCBaseModel{
  90. /// id
  91. var mealId : NSNumber?
  92. /// 图片地址
  93. var link : String?
  94. /// 单品/套餐,1单品,2套餐
  95. var mealType : String?
  96. /// 餐品名
  97. var name : String?
  98. /// 餐品名Cn
  99. var nameCn : String?
  100. ///价格
  101. var price : String?
  102. /// 限制下单时间类型,0一次性、1每日、2工作日、3周末
  103. var restrictType : String?
  104. ///runTypeId
  105. var runTypeId : String?
  106. ///supplyTypeId
  107. var supplyTypeId : String?
  108. ///评分
  109. var score : String?
  110. /// 1打折,2满减,3 赠送金额
  111. var disType : String?
  112. }
  113. //MARK: 首页获取时间范围
  114. class HomeGetTimeRangRequestModel: MCBaseRequestModel {
  115. /// 购物车类型,1为普团,2为白团
  116. var shopType : String?
  117. override func requestMethod() -> MCHttpMethod {
  118. .get
  119. }
  120. override func requestUrl() -> String {
  121. "/app/meal/getShopcartTime"
  122. }
  123. }
  124. class HomeTimeRangModel : MCBaseModel{
  125. /// endDate
  126. var endDate : String?
  127. /// shopAmount
  128. var shopAmount : Bool = false
  129. /// shopcartId
  130. var shopcartId : NSNumber?
  131. /// 时间范围id
  132. var id : NSNumber?
  133. /// startDate
  134. var startDate : String?
  135. var timeVoList : [HomeTimeItem]?
  136. }
  137. class HomeTimeItem : MCBaseModel{
  138. /// shopcartTime
  139. var shopcartTime : String?
  140. /// shopcartTimeId
  141. var shopcartTimeId : NSNumber?
  142. /// startsortDate
  143. var sort : String?
  144. /// monthCn
  145. var month : String?
  146. /// dayCn
  147. var day : String?
  148. ///是否有菜品加入购物车 是否已加购,1为已加购,0为未加购
  149. var added : String?
  150. /// 第几天
  151. var whichDay : String?
  152. var isSelect = false
  153. }
  154. //MARK: 首页大家都爱点
  155. class HomeGetEveryLoveRequestModel: MCBaseRequestModel {
  156. /// 购物车类型,1为普团,2为白团
  157. var isGeneral : String?
  158. /// 当前页
  159. var current : Int?
  160. /// 购物车时间
  161. var shopcartTime : String?
  162. /// 每页的数量
  163. var size = "10"
  164. /// 供餐类型(早餐、中餐、晚餐)
  165. var supplyTypeId : String?
  166. ///runTypeId
  167. var runTypeId : String?
  168. /// 搜索内容
  169. var mealName : String?
  170. override func requestMethod() -> MCHttpMethod {
  171. .post
  172. }
  173. override func requestUrl() -> String {
  174. "/app/meal/pageLoveMeal"
  175. }
  176. }
  177. //MARK: 业务员信息初始化
  178. class SalesmanCompleteModel: MCBaseRequestModel {
  179. /// 地址id,有则更新,无则新建
  180. var addressId : NSNumber?
  181. /// 地址备注
  182. var addressRemark : String?
  183. /// 街区号
  184. var blockNum : String?
  185. /// 建筑物名称
  186. var buildName : String?
  187. /// 结束时间
  188. var endDate : String?
  189. /// 收货手机号
  190. var phoneNum : String?
  191. /// 邮政编码
  192. var postcode : String?
  193. /// 收货人
  194. var receiving : String?
  195. /// 购物车类型,1普团,2白团
  196. var shopType : String?
  197. /// 开始日期
  198. var startDate : String?
  199. /// 街道名称
  200. var street : String?
  201. /// 楼层和门牌号
  202. var unitNum : String?
  203. override func requestMethod() -> MCHttpMethod {
  204. .post
  205. }
  206. override func requestUrl() -> String {
  207. "/app/meal/addShopcartTime"
  208. }
  209. }
  210. //MARK: 首页获取业务员信息弹窗内容
  211. class HomeGetSalesmanInputModel: MCBaseRequestModel {
  212. /// 购物车ID
  213. var id : NSNumber?
  214. override func requestMethod() -> MCHttpMethod {
  215. .post
  216. }
  217. override func requestUrl() -> String {
  218. "/app/meal/getShopcartHomeTime"
  219. }
  220. }
  221. class SalesmanInputModel : MCBaseModel{
  222. /// 地址id
  223. var addressId : NSNumber?
  224. /// 详细地址
  225. var detailAddress : String?
  226. /// 街道名称
  227. var street : String?
  228. // 开始日期
  229. var startDate : String?
  230. // 结束时间
  231. var endDate : String?
  232. // 购物车ID
  233. var shopcartId : NSNumber?
  234. // 结收货手机号
  235. var phoneNum : String?
  236. // 邮政编码
  237. var postcode : String?
  238. // 收货人
  239. var receiving : String?
  240. // 购物车类型,1普团,2白团
  241. var shopType : String?
  242. /// 街区号
  243. var blockNum : String?
  244. /// 建筑物名称
  245. var buildName : String?
  246. /// 楼层和门牌号
  247. var unitNum : String?
  248. /// 地址备注
  249. var addressRemark : String?
  250. }
  251. //MARK: 修改购物车时间范围
  252. class HomeEditorTimeRangModel: MCBaseRequestModel {
  253. /// 时间范围id
  254. var id : NSNumber?
  255. // 购物车类型,1普团,2白团
  256. var shopType : String?
  257. // 开始日期
  258. var startDate : String?
  259. // 结束时间
  260. var endDate : String?
  261. override func requestMethod() -> MCHttpMethod {
  262. .post
  263. }
  264. override func requestUrl() -> String {
  265. "/app/meal/updateShopcartTime"
  266. }
  267. }