OapiEduCourseUpdateRequest.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.edu.course.update request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.08.10
  7. */
  8. class OapiEduCourseUpdateRequest
  9. {
  10. /**
  11. * 课程唯一编码
  12. **/
  13. private $courseCode;
  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. * 课程的开始时间,Unix毫秒时间戳
  32. **/
  33. private $startTime;
  34. /**
  35. * 老师的组织CorpId
  36. **/
  37. private $teacherCorpid;
  38. /**
  39. * 老师的用户ID
  40. **/
  41. private $teacherUserid;
  42. private $apiParas = array();
  43. public function setCourseCode($courseCode)
  44. {
  45. $this->courseCode = $courseCode;
  46. $this->apiParas["course_code"] = $courseCode;
  47. }
  48. public function getCourseCode()
  49. {
  50. return $this->courseCode;
  51. }
  52. public function setEndTime($endTime)
  53. {
  54. $this->endTime = $endTime;
  55. $this->apiParas["end_time"] = $endTime;
  56. }
  57. public function getEndTime()
  58. {
  59. return $this->endTime;
  60. }
  61. public function setIntroduce($introduce)
  62. {
  63. $this->introduce = $introduce;
  64. $this->apiParas["introduce"] = $introduce;
  65. }
  66. public function getIntroduce()
  67. {
  68. return $this->introduce;
  69. }
  70. public function setName($name)
  71. {
  72. $this->name = $name;
  73. $this->apiParas["name"] = $name;
  74. }
  75. public function getName()
  76. {
  77. return $this->name;
  78. }
  79. public function setOpUserid($opUserid)
  80. {
  81. $this->opUserid = $opUserid;
  82. $this->apiParas["op_userid"] = $opUserid;
  83. }
  84. public function getOpUserid()
  85. {
  86. return $this->opUserid;
  87. }
  88. public function setStartTime($startTime)
  89. {
  90. $this->startTime = $startTime;
  91. $this->apiParas["start_time"] = $startTime;
  92. }
  93. public function getStartTime()
  94. {
  95. return $this->startTime;
  96. }
  97. public function setTeacherCorpid($teacherCorpid)
  98. {
  99. $this->teacherCorpid = $teacherCorpid;
  100. $this->apiParas["teacher_corpid"] = $teacherCorpid;
  101. }
  102. public function getTeacherCorpid()
  103. {
  104. return $this->teacherCorpid;
  105. }
  106. public function setTeacherUserid($teacherUserid)
  107. {
  108. $this->teacherUserid = $teacherUserid;
  109. $this->apiParas["teacher_userid"] = $teacherUserid;
  110. }
  111. public function getTeacherUserid()
  112. {
  113. return $this->teacherUserid;
  114. }
  115. public function getApiMethodName()
  116. {
  117. return "dingtalk.oapi.edu.course.update";
  118. }
  119. public function getApiParas()
  120. {
  121. return $this->apiParas;
  122. }
  123. public function check()
  124. {
  125. RequestCheckUtil::checkNotNull($this->courseCode,"courseCode");
  126. RequestCheckUtil::checkMaxLength($this->introduce,120,"introduce");
  127. RequestCheckUtil::checkMaxLength($this->name,64,"name");
  128. RequestCheckUtil::checkNotNull($this->opUserid,"opUserid");
  129. }
  130. public function putOtherTextParam($key, $value) {
  131. $this->apiParas[$key] = $value;
  132. $this->$key = $value;
  133. }
  134. }