PosCookDishQryDetailModel.py 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class PosCookDishQryDetailModel(object):
  6. def __init__(self):
  7. self._category_big_id = None
  8. self._dish_id = None
  9. self._dish_img = None
  10. self._dish_name = None
  11. self._dish_stall_ref = None
  12. self._min_price = None
  13. self._multi_spec = None
  14. self._special_tag = None
  15. self._spicy_tag = None
  16. self._status = None
  17. self._type = None
  18. self._unit_name = None
  19. @property
  20. def category_big_id(self):
  21. return self._category_big_id
  22. @category_big_id.setter
  23. def category_big_id(self, value):
  24. self._category_big_id = value
  25. @property
  26. def dish_id(self):
  27. return self._dish_id
  28. @dish_id.setter
  29. def dish_id(self, value):
  30. self._dish_id = value
  31. @property
  32. def dish_img(self):
  33. return self._dish_img
  34. @dish_img.setter
  35. def dish_img(self, value):
  36. self._dish_img = value
  37. @property
  38. def dish_name(self):
  39. return self._dish_name
  40. @dish_name.setter
  41. def dish_name(self, value):
  42. self._dish_name = value
  43. @property
  44. def dish_stall_ref(self):
  45. return self._dish_stall_ref
  46. @dish_stall_ref.setter
  47. def dish_stall_ref(self, value):
  48. self._dish_stall_ref = value
  49. @property
  50. def min_price(self):
  51. return self._min_price
  52. @min_price.setter
  53. def min_price(self, value):
  54. self._min_price = value
  55. @property
  56. def multi_spec(self):
  57. return self._multi_spec
  58. @multi_spec.setter
  59. def multi_spec(self, value):
  60. self._multi_spec = value
  61. @property
  62. def special_tag(self):
  63. return self._special_tag
  64. @special_tag.setter
  65. def special_tag(self, value):
  66. self._special_tag = value
  67. @property
  68. def spicy_tag(self):
  69. return self._spicy_tag
  70. @spicy_tag.setter
  71. def spicy_tag(self, value):
  72. self._spicy_tag = value
  73. @property
  74. def status(self):
  75. return self._status
  76. @status.setter
  77. def status(self, value):
  78. self._status = value
  79. @property
  80. def type(self):
  81. return self._type
  82. @type.setter
  83. def type(self, value):
  84. self._type = value
  85. @property
  86. def unit_name(self):
  87. return self._unit_name
  88. @unit_name.setter
  89. def unit_name(self, value):
  90. self._unit_name = value
  91. def to_alipay_dict(self):
  92. params = dict()
  93. if self.category_big_id:
  94. if hasattr(self.category_big_id, 'to_alipay_dict'):
  95. params['category_big_id'] = self.category_big_id.to_alipay_dict()
  96. else:
  97. params['category_big_id'] = self.category_big_id
  98. if self.dish_id:
  99. if hasattr(self.dish_id, 'to_alipay_dict'):
  100. params['dish_id'] = self.dish_id.to_alipay_dict()
  101. else:
  102. params['dish_id'] = self.dish_id
  103. if self.dish_img:
  104. if hasattr(self.dish_img, 'to_alipay_dict'):
  105. params['dish_img'] = self.dish_img.to_alipay_dict()
  106. else:
  107. params['dish_img'] = self.dish_img
  108. if self.dish_name:
  109. if hasattr(self.dish_name, 'to_alipay_dict'):
  110. params['dish_name'] = self.dish_name.to_alipay_dict()
  111. else:
  112. params['dish_name'] = self.dish_name
  113. if self.dish_stall_ref:
  114. if hasattr(self.dish_stall_ref, 'to_alipay_dict'):
  115. params['dish_stall_ref'] = self.dish_stall_ref.to_alipay_dict()
  116. else:
  117. params['dish_stall_ref'] = self.dish_stall_ref
  118. if self.min_price:
  119. if hasattr(self.min_price, 'to_alipay_dict'):
  120. params['min_price'] = self.min_price.to_alipay_dict()
  121. else:
  122. params['min_price'] = self.min_price
  123. if self.multi_spec:
  124. if hasattr(self.multi_spec, 'to_alipay_dict'):
  125. params['multi_spec'] = self.multi_spec.to_alipay_dict()
  126. else:
  127. params['multi_spec'] = self.multi_spec
  128. if self.special_tag:
  129. if hasattr(self.special_tag, 'to_alipay_dict'):
  130. params['special_tag'] = self.special_tag.to_alipay_dict()
  131. else:
  132. params['special_tag'] = self.special_tag
  133. if self.spicy_tag:
  134. if hasattr(self.spicy_tag, 'to_alipay_dict'):
  135. params['spicy_tag'] = self.spicy_tag.to_alipay_dict()
  136. else:
  137. params['spicy_tag'] = self.spicy_tag
  138. if self.status:
  139. if hasattr(self.status, 'to_alipay_dict'):
  140. params['status'] = self.status.to_alipay_dict()
  141. else:
  142. params['status'] = self.status
  143. if self.type:
  144. if hasattr(self.type, 'to_alipay_dict'):
  145. params['type'] = self.type.to_alipay_dict()
  146. else:
  147. params['type'] = self.type
  148. if self.unit_name:
  149. if hasattr(self.unit_name, 'to_alipay_dict'):
  150. params['unit_name'] = self.unit_name.to_alipay_dict()
  151. else:
  152. params['unit_name'] = self.unit_name
  153. return params
  154. @staticmethod
  155. def from_alipay_dict(d):
  156. if not d:
  157. return None
  158. o = PosCookDishQryDetailModel()
  159. if 'category_big_id' in d:
  160. o.category_big_id = d['category_big_id']
  161. if 'dish_id' in d:
  162. o.dish_id = d['dish_id']
  163. if 'dish_img' in d:
  164. o.dish_img = d['dish_img']
  165. if 'dish_name' in d:
  166. o.dish_name = d['dish_name']
  167. if 'dish_stall_ref' in d:
  168. o.dish_stall_ref = d['dish_stall_ref']
  169. if 'min_price' in d:
  170. o.min_price = d['min_price']
  171. if 'multi_spec' in d:
  172. o.multi_spec = d['multi_spec']
  173. if 'special_tag' in d:
  174. o.special_tag = d['special_tag']
  175. if 'spicy_tag' in d:
  176. o.spicy_tag = d['spicy_tag']
  177. if 'status' in d:
  178. o.status = d['status']
  179. if 'type' in d:
  180. o.type = d['type']
  181. if 'unit_name' in d:
  182. o.unit_name = d['unit_name']
  183. return o