ActivityAuditDTO.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ActivityAuditDTO(object):
  6. def __init__(self):
  7. self._audit_id = None
  8. self._audit_status = None
  9. self._creator_id = None
  10. self._creator_type = None
  11. self._operation_time = None
  12. self._reason = None
  13. @property
  14. def audit_id(self):
  15. return self._audit_id
  16. @audit_id.setter
  17. def audit_id(self, value):
  18. self._audit_id = value
  19. @property
  20. def audit_status(self):
  21. return self._audit_status
  22. @audit_status.setter
  23. def audit_status(self, value):
  24. self._audit_status = value
  25. @property
  26. def creator_id(self):
  27. return self._creator_id
  28. @creator_id.setter
  29. def creator_id(self, value):
  30. self._creator_id = value
  31. @property
  32. def creator_type(self):
  33. return self._creator_type
  34. @creator_type.setter
  35. def creator_type(self, value):
  36. self._creator_type = value
  37. @property
  38. def operation_time(self):
  39. return self._operation_time
  40. @operation_time.setter
  41. def operation_time(self, value):
  42. self._operation_time = value
  43. @property
  44. def reason(self):
  45. return self._reason
  46. @reason.setter
  47. def reason(self, value):
  48. self._reason = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.audit_id:
  52. if hasattr(self.audit_id, 'to_alipay_dict'):
  53. params['audit_id'] = self.audit_id.to_alipay_dict()
  54. else:
  55. params['audit_id'] = self.audit_id
  56. if self.audit_status:
  57. if hasattr(self.audit_status, 'to_alipay_dict'):
  58. params['audit_status'] = self.audit_status.to_alipay_dict()
  59. else:
  60. params['audit_status'] = self.audit_status
  61. if self.creator_id:
  62. if hasattr(self.creator_id, 'to_alipay_dict'):
  63. params['creator_id'] = self.creator_id.to_alipay_dict()
  64. else:
  65. params['creator_id'] = self.creator_id
  66. if self.creator_type:
  67. if hasattr(self.creator_type, 'to_alipay_dict'):
  68. params['creator_type'] = self.creator_type.to_alipay_dict()
  69. else:
  70. params['creator_type'] = self.creator_type
  71. if self.operation_time:
  72. if hasattr(self.operation_time, 'to_alipay_dict'):
  73. params['operation_time'] = self.operation_time.to_alipay_dict()
  74. else:
  75. params['operation_time'] = self.operation_time
  76. if self.reason:
  77. if hasattr(self.reason, 'to_alipay_dict'):
  78. params['reason'] = self.reason.to_alipay_dict()
  79. else:
  80. params['reason'] = self.reason
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = ActivityAuditDTO()
  87. if 'audit_id' in d:
  88. o.audit_id = d['audit_id']
  89. if 'audit_status' in d:
  90. o.audit_status = d['audit_status']
  91. if 'creator_id' in d:
  92. o.creator_id = d['creator_id']
  93. if 'creator_type' in d:
  94. o.creator_type = d['creator_type']
  95. if 'operation_time' in d:
  96. o.operation_time = d['operation_time']
  97. if 'reason' in d:
  98. o.reason = d['reason']
  99. return o