Audit.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: JZ
  5. * Date: 2019/7/19
  6. * Time: 9:56
  7. */
  8. class Audit implements JsonSerializable {
  9. private $employee;
  10. private $pass;
  11. private $contractId;
  12. private $bizId;
  13. private $comment;
  14. public function jsonSerialize() {
  15. $data = [];
  16. foreach ($this as $key=>$val){
  17. if ($val !== null) $data[$key] = $val;
  18. }
  19. if(sizeof($data) < 1){
  20. return null;
  21. }
  22. return $data;
  23. }
  24. /**
  25. * @return mixed
  26. */
  27. public function getEmployee()
  28. {
  29. return $this->employee;
  30. }
  31. /**
  32. * @param mixed $employee
  33. */
  34. public function setEmployee($employee)
  35. {
  36. $this->employee = $employee;
  37. }
  38. /**
  39. * @return mixed
  40. */
  41. public function getPass()
  42. {
  43. return $this->pass;
  44. }
  45. /**
  46. * @param mixed $pass
  47. */
  48. public function setPass($pass)
  49. {
  50. $this->pass = $pass;
  51. }
  52. /**
  53. * @return mixed
  54. */
  55. public function getContractId()
  56. {
  57. return $this->contractId;
  58. }
  59. /**
  60. * @param mixed $contractId
  61. */
  62. public function setContractId($contractId)
  63. {
  64. $this->contractId = $contractId;
  65. }
  66. /**
  67. * @return mixed
  68. */
  69. public function getBizId()
  70. {
  71. return $this->bizId;
  72. }
  73. /**
  74. * @param mixed $bizId
  75. */
  76. public function setBizId($bizId)
  77. {
  78. $this->bizId = $bizId;
  79. }
  80. /**
  81. * @return mixed
  82. */
  83. public function getComment()
  84. {
  85. return $this->comment;
  86. }
  87. /**
  88. * @param mixed $comment
  89. */
  90. public function setComment($comment)
  91. {
  92. $this->comment = $comment;
  93. }
  94. }