OapiEduGuardianCreateRequest.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.edu.guardian.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.04.15
  7. */
  8. class OapiEduGuardianCreateRequest
  9. {
  10. /**
  11. * 业务id
  12. **/
  13. private $bizId;
  14. /**
  15. * 班级id
  16. **/
  17. private $classId;
  18. /**
  19. * 手机号码
  20. **/
  21. private $mobile;
  22. /**
  23. * 钉钉企业管理员
  24. **/
  25. private $operator;
  26. /**
  27. * 关系code;关系枚举如下: F:爸爸 M:妈妈 GF:爷爷 GM:奶奶 GFA:外公 GMA:外婆 U:叔叔 A:阿姨 B:哥哥 S:姐姐 O:其他
  28. **/
  29. private $relation;
  30. /**
  31. * 学生id
  32. **/
  33. private $stuId;
  34. private $apiParas = array();
  35. public function setBizId($bizId)
  36. {
  37. $this->bizId = $bizId;
  38. $this->apiParas["biz_id"] = $bizId;
  39. }
  40. public function getBizId()
  41. {
  42. return $this->bizId;
  43. }
  44. public function setClassId($classId)
  45. {
  46. $this->classId = $classId;
  47. $this->apiParas["class_id"] = $classId;
  48. }
  49. public function getClassId()
  50. {
  51. return $this->classId;
  52. }
  53. public function setMobile($mobile)
  54. {
  55. $this->mobile = $mobile;
  56. $this->apiParas["mobile"] = $mobile;
  57. }
  58. public function getMobile()
  59. {
  60. return $this->mobile;
  61. }
  62. public function setOperator($operator)
  63. {
  64. $this->operator = $operator;
  65. $this->apiParas["operator"] = $operator;
  66. }
  67. public function getOperator()
  68. {
  69. return $this->operator;
  70. }
  71. public function setRelation($relation)
  72. {
  73. $this->relation = $relation;
  74. $this->apiParas["relation"] = $relation;
  75. }
  76. public function getRelation()
  77. {
  78. return $this->relation;
  79. }
  80. public function setStuId($stuId)
  81. {
  82. $this->stuId = $stuId;
  83. $this->apiParas["stu_id"] = $stuId;
  84. }
  85. public function getStuId()
  86. {
  87. return $this->stuId;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "dingtalk.oapi.edu.guardian.create";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->classId,"classId");
  100. RequestCheckUtil::checkNotNull($this->mobile,"mobile");
  101. RequestCheckUtil::checkNotNull($this->operator,"operator");
  102. RequestCheckUtil::checkNotNull($this->relation,"relation");
  103. RequestCheckUtil::checkNotNull($this->stuId,"stuId");
  104. }
  105. public function putOtherTextParam($key, $value) {
  106. $this->apiParas[$key] = $value;
  107. $this->$key = $value;
  108. }
  109. }