MerchantshopCommentResult.py 5.8 KB

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