KbPosOrderDishDetail.py 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KbPosOrderDishDetail(object):
  6. def __init__(self):
  7. self._change_price = None
  8. self._change_reason = None
  9. self._cook_id = None
  10. self._cook_version = None
  11. self._discountable = None
  12. self._dish_id = None
  13. self._dish_name = None
  14. self._dish_num = None
  15. self._dish_unit = None
  16. self._dish_version = None
  17. self._ext_info = None
  18. self._has_change = None
  19. self._main_flag = None
  20. self._main_out_detail_no = None
  21. self._make_status = None
  22. self._member_price = None
  23. self._memo = None
  24. self._operator = None
  25. self._order_time = None
  26. self._out_detail_no = None
  27. self._practice_info = None
  28. self._practice_price = None
  29. self._refund_reason = None
  30. self._refund_time = None
  31. self._remind_time = None
  32. self._sales_properties = None
  33. self._sell_price = None
  34. self._sku_id = None
  35. self._sort = None
  36. self._spec_name = None
  37. self._type = None
  38. self._user_identity = None
  39. self._wake_status = None
  40. @property
  41. def change_price(self):
  42. return self._change_price
  43. @change_price.setter
  44. def change_price(self, value):
  45. self._change_price = value
  46. @property
  47. def change_reason(self):
  48. return self._change_reason
  49. @change_reason.setter
  50. def change_reason(self, value):
  51. self._change_reason = value
  52. @property
  53. def cook_id(self):
  54. return self._cook_id
  55. @cook_id.setter
  56. def cook_id(self, value):
  57. self._cook_id = value
  58. @property
  59. def cook_version(self):
  60. return self._cook_version
  61. @cook_version.setter
  62. def cook_version(self, value):
  63. self._cook_version = value
  64. @property
  65. def discountable(self):
  66. return self._discountable
  67. @discountable.setter
  68. def discountable(self, value):
  69. self._discountable = value
  70. @property
  71. def dish_id(self):
  72. return self._dish_id
  73. @dish_id.setter
  74. def dish_id(self, value):
  75. self._dish_id = value
  76. @property
  77. def dish_name(self):
  78. return self._dish_name
  79. @dish_name.setter
  80. def dish_name(self, value):
  81. self._dish_name = value
  82. @property
  83. def dish_num(self):
  84. return self._dish_num
  85. @dish_num.setter
  86. def dish_num(self, value):
  87. self._dish_num = value
  88. @property
  89. def dish_unit(self):
  90. return self._dish_unit
  91. @dish_unit.setter
  92. def dish_unit(self, value):
  93. self._dish_unit = value
  94. @property
  95. def dish_version(self):
  96. return self._dish_version
  97. @dish_version.setter
  98. def dish_version(self, value):
  99. self._dish_version = value
  100. @property
  101. def ext_info(self):
  102. return self._ext_info
  103. @ext_info.setter
  104. def ext_info(self, value):
  105. self._ext_info = value
  106. @property
  107. def has_change(self):
  108. return self._has_change
  109. @has_change.setter
  110. def has_change(self, value):
  111. self._has_change = value
  112. @property
  113. def main_flag(self):
  114. return self._main_flag
  115. @main_flag.setter
  116. def main_flag(self, value):
  117. self._main_flag = value
  118. @property
  119. def main_out_detail_no(self):
  120. return self._main_out_detail_no
  121. @main_out_detail_no.setter
  122. def main_out_detail_no(self, value):
  123. self._main_out_detail_no = value
  124. @property
  125. def make_status(self):
  126. return self._make_status
  127. @make_status.setter
  128. def make_status(self, value):
  129. self._make_status = value
  130. @property
  131. def member_price(self):
  132. return self._member_price
  133. @member_price.setter
  134. def member_price(self, value):
  135. self._member_price = value
  136. @property
  137. def memo(self):
  138. return self._memo
  139. @memo.setter
  140. def memo(self, value):
  141. self._memo = value
  142. @property
  143. def operator(self):
  144. return self._operator
  145. @operator.setter
  146. def operator(self, value):
  147. self._operator = value
  148. @property
  149. def order_time(self):
  150. return self._order_time
  151. @order_time.setter
  152. def order_time(self, value):
  153. self._order_time = value
  154. @property
  155. def out_detail_no(self):
  156. return self._out_detail_no
  157. @out_detail_no.setter
  158. def out_detail_no(self, value):
  159. self._out_detail_no = value
  160. @property
  161. def practice_info(self):
  162. return self._practice_info
  163. @practice_info.setter
  164. def practice_info(self, value):
  165. self._practice_info = value
  166. @property
  167. def practice_price(self):
  168. return self._practice_price
  169. @practice_price.setter
  170. def practice_price(self, value):
  171. self._practice_price = value
  172. @property
  173. def refund_reason(self):
  174. return self._refund_reason
  175. @refund_reason.setter
  176. def refund_reason(self, value):
  177. self._refund_reason = value
  178. @property
  179. def refund_time(self):
  180. return self._refund_time
  181. @refund_time.setter
  182. def refund_time(self, value):
  183. self._refund_time = value
  184. @property
  185. def remind_time(self):
  186. return self._remind_time
  187. @remind_time.setter
  188. def remind_time(self, value):
  189. self._remind_time = value
  190. @property
  191. def sales_properties(self):
  192. return self._sales_properties
  193. @sales_properties.setter
  194. def sales_properties(self, value):
  195. self._sales_properties = value
  196. @property
  197. def sell_price(self):
  198. return self._sell_price
  199. @sell_price.setter
  200. def sell_price(self, value):
  201. self._sell_price = value
  202. @property
  203. def sku_id(self):
  204. return self._sku_id
  205. @sku_id.setter
  206. def sku_id(self, value):
  207. self._sku_id = value
  208. @property
  209. def sort(self):
  210. return self._sort
  211. @sort.setter
  212. def sort(self, value):
  213. self._sort = value
  214. @property
  215. def spec_name(self):
  216. return self._spec_name
  217. @spec_name.setter
  218. def spec_name(self, value):
  219. self._spec_name = value
  220. @property
  221. def type(self):
  222. return self._type
  223. @type.setter
  224. def type(self, value):
  225. self._type = value
  226. @property
  227. def user_identity(self):
  228. return self._user_identity
  229. @user_identity.setter
  230. def user_identity(self, value):
  231. self._user_identity = value
  232. @property
  233. def wake_status(self):
  234. return self._wake_status
  235. @wake_status.setter
  236. def wake_status(self, value):
  237. self._wake_status = value
  238. def to_alipay_dict(self):
  239. params = dict()
  240. if self.change_price:
  241. if hasattr(self.change_price, 'to_alipay_dict'):
  242. params['change_price'] = self.change_price.to_alipay_dict()
  243. else:
  244. params['change_price'] = self.change_price
  245. if self.change_reason:
  246. if hasattr(self.change_reason, 'to_alipay_dict'):
  247. params['change_reason'] = self.change_reason.to_alipay_dict()
  248. else:
  249. params['change_reason'] = self.change_reason
  250. if self.cook_id:
  251. if hasattr(self.cook_id, 'to_alipay_dict'):
  252. params['cook_id'] = self.cook_id.to_alipay_dict()
  253. else:
  254. params['cook_id'] = self.cook_id
  255. if self.cook_version:
  256. if hasattr(self.cook_version, 'to_alipay_dict'):
  257. params['cook_version'] = self.cook_version.to_alipay_dict()
  258. else:
  259. params['cook_version'] = self.cook_version
  260. if self.discountable:
  261. if hasattr(self.discountable, 'to_alipay_dict'):
  262. params['discountable'] = self.discountable.to_alipay_dict()
  263. else:
  264. params['discountable'] = self.discountable
  265. if self.dish_id:
  266. if hasattr(self.dish_id, 'to_alipay_dict'):
  267. params['dish_id'] = self.dish_id.to_alipay_dict()
  268. else:
  269. params['dish_id'] = self.dish_id
  270. if self.dish_name:
  271. if hasattr(self.dish_name, 'to_alipay_dict'):
  272. params['dish_name'] = self.dish_name.to_alipay_dict()
  273. else:
  274. params['dish_name'] = self.dish_name
  275. if self.dish_num:
  276. if hasattr(self.dish_num, 'to_alipay_dict'):
  277. params['dish_num'] = self.dish_num.to_alipay_dict()
  278. else:
  279. params['dish_num'] = self.dish_num
  280. if self.dish_unit:
  281. if hasattr(self.dish_unit, 'to_alipay_dict'):
  282. params['dish_unit'] = self.dish_unit.to_alipay_dict()
  283. else:
  284. params['dish_unit'] = self.dish_unit
  285. if self.dish_version:
  286. if hasattr(self.dish_version, 'to_alipay_dict'):
  287. params['dish_version'] = self.dish_version.to_alipay_dict()
  288. else:
  289. params['dish_version'] = self.dish_version
  290. if self.ext_info:
  291. if hasattr(self.ext_info, 'to_alipay_dict'):
  292. params['ext_info'] = self.ext_info.to_alipay_dict()
  293. else:
  294. params['ext_info'] = self.ext_info
  295. if self.has_change:
  296. if hasattr(self.has_change, 'to_alipay_dict'):
  297. params['has_change'] = self.has_change.to_alipay_dict()
  298. else:
  299. params['has_change'] = self.has_change
  300. if self.main_flag:
  301. if hasattr(self.main_flag, 'to_alipay_dict'):
  302. params['main_flag'] = self.main_flag.to_alipay_dict()
  303. else:
  304. params['main_flag'] = self.main_flag
  305. if self.main_out_detail_no:
  306. if hasattr(self.main_out_detail_no, 'to_alipay_dict'):
  307. params['main_out_detail_no'] = self.main_out_detail_no.to_alipay_dict()
  308. else:
  309. params['main_out_detail_no'] = self.main_out_detail_no
  310. if self.make_status:
  311. if hasattr(self.make_status, 'to_alipay_dict'):
  312. params['make_status'] = self.make_status.to_alipay_dict()
  313. else:
  314. params['make_status'] = self.make_status
  315. if self.member_price:
  316. if hasattr(self.member_price, 'to_alipay_dict'):
  317. params['member_price'] = self.member_price.to_alipay_dict()
  318. else:
  319. params['member_price'] = self.member_price
  320. if self.memo:
  321. if hasattr(self.memo, 'to_alipay_dict'):
  322. params['memo'] = self.memo.to_alipay_dict()
  323. else:
  324. params['memo'] = self.memo
  325. if self.operator:
  326. if hasattr(self.operator, 'to_alipay_dict'):
  327. params['operator'] = self.operator.to_alipay_dict()
  328. else:
  329. params['operator'] = self.operator
  330. if self.order_time:
  331. if hasattr(self.order_time, 'to_alipay_dict'):
  332. params['order_time'] = self.order_time.to_alipay_dict()
  333. else:
  334. params['order_time'] = self.order_time
  335. if self.out_detail_no:
  336. if hasattr(self.out_detail_no, 'to_alipay_dict'):
  337. params['out_detail_no'] = self.out_detail_no.to_alipay_dict()
  338. else:
  339. params['out_detail_no'] = self.out_detail_no
  340. if self.practice_info:
  341. if hasattr(self.practice_info, 'to_alipay_dict'):
  342. params['practice_info'] = self.practice_info.to_alipay_dict()
  343. else:
  344. params['practice_info'] = self.practice_info
  345. if self.practice_price:
  346. if hasattr(self.practice_price, 'to_alipay_dict'):
  347. params['practice_price'] = self.practice_price.to_alipay_dict()
  348. else:
  349. params['practice_price'] = self.practice_price
  350. if self.refund_reason:
  351. if hasattr(self.refund_reason, 'to_alipay_dict'):
  352. params['refund_reason'] = self.refund_reason.to_alipay_dict()
  353. else:
  354. params['refund_reason'] = self.refund_reason
  355. if self.refund_time:
  356. if hasattr(self.refund_time, 'to_alipay_dict'):
  357. params['refund_time'] = self.refund_time.to_alipay_dict()
  358. else:
  359. params['refund_time'] = self.refund_time
  360. if self.remind_time:
  361. if hasattr(self.remind_time, 'to_alipay_dict'):
  362. params['remind_time'] = self.remind_time.to_alipay_dict()
  363. else:
  364. params['remind_time'] = self.remind_time
  365. if self.sales_properties:
  366. if hasattr(self.sales_properties, 'to_alipay_dict'):
  367. params['sales_properties'] = self.sales_properties.to_alipay_dict()
  368. else:
  369. params['sales_properties'] = self.sales_properties
  370. if self.sell_price:
  371. if hasattr(self.sell_price, 'to_alipay_dict'):
  372. params['sell_price'] = self.sell_price.to_alipay_dict()
  373. else:
  374. params['sell_price'] = self.sell_price
  375. if self.sku_id:
  376. if hasattr(self.sku_id, 'to_alipay_dict'):
  377. params['sku_id'] = self.sku_id.to_alipay_dict()
  378. else:
  379. params['sku_id'] = self.sku_id
  380. if self.sort:
  381. if hasattr(self.sort, 'to_alipay_dict'):
  382. params['sort'] = self.sort.to_alipay_dict()
  383. else:
  384. params['sort'] = self.sort
  385. if self.spec_name:
  386. if hasattr(self.spec_name, 'to_alipay_dict'):
  387. params['spec_name'] = self.spec_name.to_alipay_dict()
  388. else:
  389. params['spec_name'] = self.spec_name
  390. if self.type:
  391. if hasattr(self.type, 'to_alipay_dict'):
  392. params['type'] = self.type.to_alipay_dict()
  393. else:
  394. params['type'] = self.type
  395. if self.user_identity:
  396. if hasattr(self.user_identity, 'to_alipay_dict'):
  397. params['user_identity'] = self.user_identity.to_alipay_dict()
  398. else:
  399. params['user_identity'] = self.user_identity
  400. if self.wake_status:
  401. if hasattr(self.wake_status, 'to_alipay_dict'):
  402. params['wake_status'] = self.wake_status.to_alipay_dict()
  403. else:
  404. params['wake_status'] = self.wake_status
  405. return params
  406. @staticmethod
  407. def from_alipay_dict(d):
  408. if not d:
  409. return None
  410. o = KbPosOrderDishDetail()
  411. if 'change_price' in d:
  412. o.change_price = d['change_price']
  413. if 'change_reason' in d:
  414. o.change_reason = d['change_reason']
  415. if 'cook_id' in d:
  416. o.cook_id = d['cook_id']
  417. if 'cook_version' in d:
  418. o.cook_version = d['cook_version']
  419. if 'discountable' in d:
  420. o.discountable = d['discountable']
  421. if 'dish_id' in d:
  422. o.dish_id = d['dish_id']
  423. if 'dish_name' in d:
  424. o.dish_name = d['dish_name']
  425. if 'dish_num' in d:
  426. o.dish_num = d['dish_num']
  427. if 'dish_unit' in d:
  428. o.dish_unit = d['dish_unit']
  429. if 'dish_version' in d:
  430. o.dish_version = d['dish_version']
  431. if 'ext_info' in d:
  432. o.ext_info = d['ext_info']
  433. if 'has_change' in d:
  434. o.has_change = d['has_change']
  435. if 'main_flag' in d:
  436. o.main_flag = d['main_flag']
  437. if 'main_out_detail_no' in d:
  438. o.main_out_detail_no = d['main_out_detail_no']
  439. if 'make_status' in d:
  440. o.make_status = d['make_status']
  441. if 'member_price' in d:
  442. o.member_price = d['member_price']
  443. if 'memo' in d:
  444. o.memo = d['memo']
  445. if 'operator' in d:
  446. o.operator = d['operator']
  447. if 'order_time' in d:
  448. o.order_time = d['order_time']
  449. if 'out_detail_no' in d:
  450. o.out_detail_no = d['out_detail_no']
  451. if 'practice_info' in d:
  452. o.practice_info = d['practice_info']
  453. if 'practice_price' in d:
  454. o.practice_price = d['practice_price']
  455. if 'refund_reason' in d:
  456. o.refund_reason = d['refund_reason']
  457. if 'refund_time' in d:
  458. o.refund_time = d['refund_time']
  459. if 'remind_time' in d:
  460. o.remind_time = d['remind_time']
  461. if 'sales_properties' in d:
  462. o.sales_properties = d['sales_properties']
  463. if 'sell_price' in d:
  464. o.sell_price = d['sell_price']
  465. if 'sku_id' in d:
  466. o.sku_id = d['sku_id']
  467. if 'sort' in d:
  468. o.sort = d['sort']
  469. if 'spec_name' in d:
  470. o.spec_name = d['spec_name']
  471. if 'type' in d:
  472. o.type = d['type']
  473. if 'user_identity' in d:
  474. o.user_identity = d['user_identity']
  475. if 'wake_status' in d:
  476. o.wake_status = d['wake_status']
  477. return o