KoubeiCateringDishCookQueryModel.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiCateringDishCookQueryModel(object):
  6. def __init__(self):
  7. self._cook_id = None
  8. self._cook_status = None
  9. self._detail_catetory_big_id = None
  10. self._detail_catetory_small_id = None
  11. self._detail_status = None
  12. self._dish_id = None
  13. self._merchant_id = None
  14. @property
  15. def cook_id(self):
  16. return self._cook_id
  17. @cook_id.setter
  18. def cook_id(self, value):
  19. self._cook_id = value
  20. @property
  21. def cook_status(self):
  22. return self._cook_status
  23. @cook_status.setter
  24. def cook_status(self, value):
  25. self._cook_status = value
  26. @property
  27. def detail_catetory_big_id(self):
  28. return self._detail_catetory_big_id
  29. @detail_catetory_big_id.setter
  30. def detail_catetory_big_id(self, value):
  31. self._detail_catetory_big_id = value
  32. @property
  33. def detail_catetory_small_id(self):
  34. return self._detail_catetory_small_id
  35. @detail_catetory_small_id.setter
  36. def detail_catetory_small_id(self, value):
  37. self._detail_catetory_small_id = value
  38. @property
  39. def detail_status(self):
  40. return self._detail_status
  41. @detail_status.setter
  42. def detail_status(self, value):
  43. self._detail_status = value
  44. @property
  45. def dish_id(self):
  46. return self._dish_id
  47. @dish_id.setter
  48. def dish_id(self, value):
  49. self._dish_id = value
  50. @property
  51. def merchant_id(self):
  52. return self._merchant_id
  53. @merchant_id.setter
  54. def merchant_id(self, value):
  55. self._merchant_id = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.cook_id:
  59. if hasattr(self.cook_id, 'to_alipay_dict'):
  60. params['cook_id'] = self.cook_id.to_alipay_dict()
  61. else:
  62. params['cook_id'] = self.cook_id
  63. if self.cook_status:
  64. if hasattr(self.cook_status, 'to_alipay_dict'):
  65. params['cook_status'] = self.cook_status.to_alipay_dict()
  66. else:
  67. params['cook_status'] = self.cook_status
  68. if self.detail_catetory_big_id:
  69. if hasattr(self.detail_catetory_big_id, 'to_alipay_dict'):
  70. params['detail_catetory_big_id'] = self.detail_catetory_big_id.to_alipay_dict()
  71. else:
  72. params['detail_catetory_big_id'] = self.detail_catetory_big_id
  73. if self.detail_catetory_small_id:
  74. if hasattr(self.detail_catetory_small_id, 'to_alipay_dict'):
  75. params['detail_catetory_small_id'] = self.detail_catetory_small_id.to_alipay_dict()
  76. else:
  77. params['detail_catetory_small_id'] = self.detail_catetory_small_id
  78. if self.detail_status:
  79. if hasattr(self.detail_status, 'to_alipay_dict'):
  80. params['detail_status'] = self.detail_status.to_alipay_dict()
  81. else:
  82. params['detail_status'] = self.detail_status
  83. if self.dish_id:
  84. if hasattr(self.dish_id, 'to_alipay_dict'):
  85. params['dish_id'] = self.dish_id.to_alipay_dict()
  86. else:
  87. params['dish_id'] = self.dish_id
  88. if self.merchant_id:
  89. if hasattr(self.merchant_id, 'to_alipay_dict'):
  90. params['merchant_id'] = self.merchant_id.to_alipay_dict()
  91. else:
  92. params['merchant_id'] = self.merchant_id
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = KoubeiCateringDishCookQueryModel()
  99. if 'cook_id' in d:
  100. o.cook_id = d['cook_id']
  101. if 'cook_status' in d:
  102. o.cook_status = d['cook_status']
  103. if 'detail_catetory_big_id' in d:
  104. o.detail_catetory_big_id = d['detail_catetory_big_id']
  105. if 'detail_catetory_small_id' in d:
  106. o.detail_catetory_small_id = d['detail_catetory_small_id']
  107. if 'detail_status' in d:
  108. o.detail_status = d['detail_status']
  109. if 'dish_id' in d:
  110. o.dish_id = d['dish_id']
  111. if 'merchant_id' in d:
  112. o.merchant_id = d['merchant_id']
  113. return o