KdsDishGroupInfoDTO.py 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KdsDishGroupInfoDTO(object):
  6. def __init__(self):
  7. self._cook_cost = None
  8. self._dish_id = None
  9. self._dish_name = None
  10. self._dish_sku_id = None
  11. self._dish_time = None
  12. self._dish_unit = None
  13. self._ext_info = None
  14. self._max_cook_num = None
  15. self._memo = None
  16. self._out_dish_id = None
  17. self._out_dish_info = None
  18. self._out_dish_sku_id = None
  19. self._out_parent_id = None
  20. self._practice_desc = None
  21. self._practice_id = None
  22. self._quantity = None
  23. self._sales_properties = None
  24. self._sku_spec_desc = None
  25. self._spec_id = None
  26. self._type = None
  27. @property
  28. def cook_cost(self):
  29. return self._cook_cost
  30. @cook_cost.setter
  31. def cook_cost(self, value):
  32. self._cook_cost = value
  33. @property
  34. def dish_id(self):
  35. return self._dish_id
  36. @dish_id.setter
  37. def dish_id(self, value):
  38. self._dish_id = value
  39. @property
  40. def dish_name(self):
  41. return self._dish_name
  42. @dish_name.setter
  43. def dish_name(self, value):
  44. self._dish_name = value
  45. @property
  46. def dish_sku_id(self):
  47. return self._dish_sku_id
  48. @dish_sku_id.setter
  49. def dish_sku_id(self, value):
  50. self._dish_sku_id = value
  51. @property
  52. def dish_time(self):
  53. return self._dish_time
  54. @dish_time.setter
  55. def dish_time(self, value):
  56. self._dish_time = value
  57. @property
  58. def dish_unit(self):
  59. return self._dish_unit
  60. @dish_unit.setter
  61. def dish_unit(self, value):
  62. self._dish_unit = value
  63. @property
  64. def ext_info(self):
  65. return self._ext_info
  66. @ext_info.setter
  67. def ext_info(self, value):
  68. self._ext_info = value
  69. @property
  70. def max_cook_num(self):
  71. return self._max_cook_num
  72. @max_cook_num.setter
  73. def max_cook_num(self, value):
  74. self._max_cook_num = value
  75. @property
  76. def memo(self):
  77. return self._memo
  78. @memo.setter
  79. def memo(self, value):
  80. self._memo = value
  81. @property
  82. def out_dish_id(self):
  83. return self._out_dish_id
  84. @out_dish_id.setter
  85. def out_dish_id(self, value):
  86. self._out_dish_id = value
  87. @property
  88. def out_dish_info(self):
  89. return self._out_dish_info
  90. @out_dish_info.setter
  91. def out_dish_info(self, value):
  92. self._out_dish_info = value
  93. @property
  94. def out_dish_sku_id(self):
  95. return self._out_dish_sku_id
  96. @out_dish_sku_id.setter
  97. def out_dish_sku_id(self, value):
  98. self._out_dish_sku_id = value
  99. @property
  100. def out_parent_id(self):
  101. return self._out_parent_id
  102. @out_parent_id.setter
  103. def out_parent_id(self, value):
  104. self._out_parent_id = value
  105. @property
  106. def practice_desc(self):
  107. return self._practice_desc
  108. @practice_desc.setter
  109. def practice_desc(self, value):
  110. self._practice_desc = value
  111. @property
  112. def practice_id(self):
  113. return self._practice_id
  114. @practice_id.setter
  115. def practice_id(self, value):
  116. self._practice_id = value
  117. @property
  118. def quantity(self):
  119. return self._quantity
  120. @quantity.setter
  121. def quantity(self, value):
  122. self._quantity = value
  123. @property
  124. def sales_properties(self):
  125. return self._sales_properties
  126. @sales_properties.setter
  127. def sales_properties(self, value):
  128. self._sales_properties = value
  129. @property
  130. def sku_spec_desc(self):
  131. return self._sku_spec_desc
  132. @sku_spec_desc.setter
  133. def sku_spec_desc(self, value):
  134. self._sku_spec_desc = value
  135. @property
  136. def spec_id(self):
  137. return self._spec_id
  138. @spec_id.setter
  139. def spec_id(self, value):
  140. self._spec_id = value
  141. @property
  142. def type(self):
  143. return self._type
  144. @type.setter
  145. def type(self, value):
  146. self._type = value
  147. def to_alipay_dict(self):
  148. params = dict()
  149. if self.cook_cost:
  150. if hasattr(self.cook_cost, 'to_alipay_dict'):
  151. params['cook_cost'] = self.cook_cost.to_alipay_dict()
  152. else:
  153. params['cook_cost'] = self.cook_cost
  154. if self.dish_id:
  155. if hasattr(self.dish_id, 'to_alipay_dict'):
  156. params['dish_id'] = self.dish_id.to_alipay_dict()
  157. else:
  158. params['dish_id'] = self.dish_id
  159. if self.dish_name:
  160. if hasattr(self.dish_name, 'to_alipay_dict'):
  161. params['dish_name'] = self.dish_name.to_alipay_dict()
  162. else:
  163. params['dish_name'] = self.dish_name
  164. if self.dish_sku_id:
  165. if hasattr(self.dish_sku_id, 'to_alipay_dict'):
  166. params['dish_sku_id'] = self.dish_sku_id.to_alipay_dict()
  167. else:
  168. params['dish_sku_id'] = self.dish_sku_id
  169. if self.dish_time:
  170. if hasattr(self.dish_time, 'to_alipay_dict'):
  171. params['dish_time'] = self.dish_time.to_alipay_dict()
  172. else:
  173. params['dish_time'] = self.dish_time
  174. if self.dish_unit:
  175. if hasattr(self.dish_unit, 'to_alipay_dict'):
  176. params['dish_unit'] = self.dish_unit.to_alipay_dict()
  177. else:
  178. params['dish_unit'] = self.dish_unit
  179. if self.ext_info:
  180. if hasattr(self.ext_info, 'to_alipay_dict'):
  181. params['ext_info'] = self.ext_info.to_alipay_dict()
  182. else:
  183. params['ext_info'] = self.ext_info
  184. if self.max_cook_num:
  185. if hasattr(self.max_cook_num, 'to_alipay_dict'):
  186. params['max_cook_num'] = self.max_cook_num.to_alipay_dict()
  187. else:
  188. params['max_cook_num'] = self.max_cook_num
  189. if self.memo:
  190. if hasattr(self.memo, 'to_alipay_dict'):
  191. params['memo'] = self.memo.to_alipay_dict()
  192. else:
  193. params['memo'] = self.memo
  194. if self.out_dish_id:
  195. if hasattr(self.out_dish_id, 'to_alipay_dict'):
  196. params['out_dish_id'] = self.out_dish_id.to_alipay_dict()
  197. else:
  198. params['out_dish_id'] = self.out_dish_id
  199. if self.out_dish_info:
  200. if hasattr(self.out_dish_info, 'to_alipay_dict'):
  201. params['out_dish_info'] = self.out_dish_info.to_alipay_dict()
  202. else:
  203. params['out_dish_info'] = self.out_dish_info
  204. if self.out_dish_sku_id:
  205. if hasattr(self.out_dish_sku_id, 'to_alipay_dict'):
  206. params['out_dish_sku_id'] = self.out_dish_sku_id.to_alipay_dict()
  207. else:
  208. params['out_dish_sku_id'] = self.out_dish_sku_id
  209. if self.out_parent_id:
  210. if hasattr(self.out_parent_id, 'to_alipay_dict'):
  211. params['out_parent_id'] = self.out_parent_id.to_alipay_dict()
  212. else:
  213. params['out_parent_id'] = self.out_parent_id
  214. if self.practice_desc:
  215. if hasattr(self.practice_desc, 'to_alipay_dict'):
  216. params['practice_desc'] = self.practice_desc.to_alipay_dict()
  217. else:
  218. params['practice_desc'] = self.practice_desc
  219. if self.practice_id:
  220. if hasattr(self.practice_id, 'to_alipay_dict'):
  221. params['practice_id'] = self.practice_id.to_alipay_dict()
  222. else:
  223. params['practice_id'] = self.practice_id
  224. if self.quantity:
  225. if hasattr(self.quantity, 'to_alipay_dict'):
  226. params['quantity'] = self.quantity.to_alipay_dict()
  227. else:
  228. params['quantity'] = self.quantity
  229. if self.sales_properties:
  230. if hasattr(self.sales_properties, 'to_alipay_dict'):
  231. params['sales_properties'] = self.sales_properties.to_alipay_dict()
  232. else:
  233. params['sales_properties'] = self.sales_properties
  234. if self.sku_spec_desc:
  235. if hasattr(self.sku_spec_desc, 'to_alipay_dict'):
  236. params['sku_spec_desc'] = self.sku_spec_desc.to_alipay_dict()
  237. else:
  238. params['sku_spec_desc'] = self.sku_spec_desc
  239. if self.spec_id:
  240. if hasattr(self.spec_id, 'to_alipay_dict'):
  241. params['spec_id'] = self.spec_id.to_alipay_dict()
  242. else:
  243. params['spec_id'] = self.spec_id
  244. if self.type:
  245. if hasattr(self.type, 'to_alipay_dict'):
  246. params['type'] = self.type.to_alipay_dict()
  247. else:
  248. params['type'] = self.type
  249. return params
  250. @staticmethod
  251. def from_alipay_dict(d):
  252. if not d:
  253. return None
  254. o = KdsDishGroupInfoDTO()
  255. if 'cook_cost' in d:
  256. o.cook_cost = d['cook_cost']
  257. if 'dish_id' in d:
  258. o.dish_id = d['dish_id']
  259. if 'dish_name' in d:
  260. o.dish_name = d['dish_name']
  261. if 'dish_sku_id' in d:
  262. o.dish_sku_id = d['dish_sku_id']
  263. if 'dish_time' in d:
  264. o.dish_time = d['dish_time']
  265. if 'dish_unit' in d:
  266. o.dish_unit = d['dish_unit']
  267. if 'ext_info' in d:
  268. o.ext_info = d['ext_info']
  269. if 'max_cook_num' in d:
  270. o.max_cook_num = d['max_cook_num']
  271. if 'memo' in d:
  272. o.memo = d['memo']
  273. if 'out_dish_id' in d:
  274. o.out_dish_id = d['out_dish_id']
  275. if 'out_dish_info' in d:
  276. o.out_dish_info = d['out_dish_info']
  277. if 'out_dish_sku_id' in d:
  278. o.out_dish_sku_id = d['out_dish_sku_id']
  279. if 'out_parent_id' in d:
  280. o.out_parent_id = d['out_parent_id']
  281. if 'practice_desc' in d:
  282. o.practice_desc = d['practice_desc']
  283. if 'practice_id' in d:
  284. o.practice_id = d['practice_id']
  285. if 'quantity' in d:
  286. o.quantity = d['quantity']
  287. if 'sales_properties' in d:
  288. o.sales_properties = d['sales_properties']
  289. if 'sku_spec_desc' in d:
  290. o.sku_spec_desc = d['sku_spec_desc']
  291. if 'spec_id' in d:
  292. o.spec_id = d['spec_id']
  293. if 'type' in d:
  294. o.type = d['type']
  295. return o