OapiEduCourseCreateRequest.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.edu.course.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.04.14
  7. */
  8. class OapiEduCourseCreateRequest
  9. {
  10. /**
  11. * 业务唯一键,用于保证课程的唯一性,防止重复创建
  12. **/
  13. private $bizKey;
  14. /**
  15. * 课程的结束时间,Unix毫秒时间戳
  16. **/
  17. private $endTime;
  18. /**
  19. * 课程介绍
  20. **/
  21. private $introduce;
  22. /**
  23. * 课程名称
  24. **/
  25. private $name;
  26. /**
  27. * 当前用户ID
  28. **/
  29. private $opUserid;
  30. /**
  31. * 课程选项信息
  32. **/
  33. private $option;
  34. /**
  35. * 课程的开始时间,Unix毫秒时间戳
  36. **/
  37. private $startTime;
  38. /**
  39. * 老师的组织CorpId
  40. **/
  41. private $teacherCorpid;
  42. /**
  43. * 老师的用户ID
  44. **/
  45. private $teacherUserid;
  46. private $apiParas = array();
  47. public function setBizKey($bizKey)
  48. {
  49. $this->bizKey = $bizKey;
  50. $this->apiParas["biz_key"] = $bizKey;
  51. }
  52. public function getBizKey()
  53. {
  54. return $this->bizKey;
  55. }
  56. public function setEndTime($endTime)
  57. {
  58. $this->endTime = $endTime;
  59. $this->apiParas["end_time"] = $endTime;
  60. }
  61. public function getEndTime()
  62. {
  63. return $this->endTime;
  64. }
  65. public function setIntroduce($introduce)
  66. {
  67. $this->introduce = $introduce;
  68. $this->apiParas["introduce"] = $introduce;
  69. }
  70. public function getIntroduce()
  71. {
  72. return $this->introduce;
  73. }
  74. public function setName($name)
  75. {
  76. $this->name = $name;
  77. $this->apiParas["name"] = $name;
  78. }
  79. public function getName()
  80. {
  81. return $this->name;
  82. }
  83. public function setOpUserid($opUserid)
  84. {
  85. $this->opUserid = $opUserid;
  86. $this->apiParas["op_userid"] = $opUserid;
  87. }
  88. public function getOpUserid()
  89. {
  90. return $this->opUserid;
  91. }
  92. public function setOption($option)
  93. {
  94. $this->option = $option;
  95. $this->apiParas["option"] = $option;
  96. }
  97. public function getOption()
  98. {
  99. return $this->option;
  100. }
  101. public function setStartTime($startTime)
  102. {
  103. $this->startTime = $startTime;
  104. $this->apiParas["start_time"] = $startTime;
  105. }
  106. public function getStartTime()
  107. {
  108. return $this->startTime;
  109. }
  110. public function setTeacherCorpid($teacherCorpid)
  111. {
  112. $this->teacherCorpid = $teacherCorpid;
  113. $this->apiParas["teacher_corpid"] = $teacherCorpid;
  114. }
  115. public function getTeacherCorpid()
  116. {
  117. return $this->teacherCorpid;
  118. }
  119. public function setTeacherUserid($teacherUserid)
  120. {
  121. $this->teacherUserid = $teacherUserid;
  122. $this->apiParas["teacher_userid"] = $teacherUserid;
  123. }
  124. public function getTeacherUserid()
  125. {
  126. return $this->teacherUserid;
  127. }
  128. public function getApiMethodName()
  129. {
  130. return "dingtalk.oapi.edu.course.create";
  131. }
  132. public function getApiParas()
  133. {
  134. return $this->apiParas;
  135. }
  136. public function check()
  137. {
  138. RequestCheckUtil::checkNotNull($this->bizKey,"bizKey");
  139. RequestCheckUtil::checkMaxLength($this->bizKey,64,"bizKey");
  140. RequestCheckUtil::checkNotNull($this->introduce,"introduce");
  141. RequestCheckUtil::checkMaxLength($this->introduce,120,"introduce");
  142. RequestCheckUtil::checkNotNull($this->name,"name");
  143. RequestCheckUtil::checkMaxLength($this->name,64,"name");
  144. RequestCheckUtil::checkNotNull($this->opUserid,"opUserid");
  145. RequestCheckUtil::checkNotNull($this->teacherCorpid,"teacherCorpid");
  146. RequestCheckUtil::checkNotNull($this->teacherUserid,"teacherUserid");
  147. }
  148. public function putOtherTextParam($key, $value) {
  149. $this->apiParas[$key] = $value;
  150. $this->$key = $value;
  151. }
  152. }