RecruitInfo.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class RecruitInfo(object):
  6. def __init__(self):
  7. self._end_time = None
  8. self._exclude_constraint_shops = None
  9. self._plan_id = None
  10. self._start_time = None
  11. self._status = None
  12. @property
  13. def end_time(self):
  14. return self._end_time
  15. @end_time.setter
  16. def end_time(self, value):
  17. self._end_time = value
  18. @property
  19. def exclude_constraint_shops(self):
  20. return self._exclude_constraint_shops
  21. @exclude_constraint_shops.setter
  22. def exclude_constraint_shops(self, value):
  23. self._exclude_constraint_shops = value
  24. @property
  25. def plan_id(self):
  26. return self._plan_id
  27. @plan_id.setter
  28. def plan_id(self, value):
  29. self._plan_id = value
  30. @property
  31. def start_time(self):
  32. return self._start_time
  33. @start_time.setter
  34. def start_time(self, value):
  35. self._start_time = value
  36. @property
  37. def status(self):
  38. return self._status
  39. @status.setter
  40. def status(self, value):
  41. self._status = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.end_time:
  45. if hasattr(self.end_time, 'to_alipay_dict'):
  46. params['end_time'] = self.end_time.to_alipay_dict()
  47. else:
  48. params['end_time'] = self.end_time
  49. if self.exclude_constraint_shops:
  50. if hasattr(self.exclude_constraint_shops, 'to_alipay_dict'):
  51. params['exclude_constraint_shops'] = self.exclude_constraint_shops.to_alipay_dict()
  52. else:
  53. params['exclude_constraint_shops'] = self.exclude_constraint_shops
  54. if self.plan_id:
  55. if hasattr(self.plan_id, 'to_alipay_dict'):
  56. params['plan_id'] = self.plan_id.to_alipay_dict()
  57. else:
  58. params['plan_id'] = self.plan_id
  59. if self.start_time:
  60. if hasattr(self.start_time, 'to_alipay_dict'):
  61. params['start_time'] = self.start_time.to_alipay_dict()
  62. else:
  63. params['start_time'] = self.start_time
  64. if self.status:
  65. if hasattr(self.status, 'to_alipay_dict'):
  66. params['status'] = self.status.to_alipay_dict()
  67. else:
  68. params['status'] = self.status
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = RecruitInfo()
  75. if 'end_time' in d:
  76. o.end_time = d['end_time']
  77. if 'exclude_constraint_shops' in d:
  78. o.exclude_constraint_shops = d['exclude_constraint_shops']
  79. if 'plan_id' in d:
  80. o.plan_id = d['plan_id']
  81. if 'start_time' in d:
  82. o.start_time = d['start_time']
  83. if 'status' in d:
  84. o.status = d['status']
  85. return o