OapiWorkrecordAddRequest.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.workrecord.add request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2022.03.24
  7. */
  8. class OapiWorkrecordAddRequest
  9. {
  10. /**
  11. * 外部业务id,建议带上业务方来源字段,防止与其他业务方冲突
  12. **/
  13. private $bizId;
  14. /**
  15. * 待办时间。Unix时间戳
  16. **/
  17. private $createTime;
  18. /**
  19. * 表单列表
  20. **/
  21. private $formItemList;
  22. /**
  23. * 发起人id
  24. **/
  25. private $originatorUserId;
  26. /**
  27. * pc端跳转url,不传则使用url参数
  28. **/
  29. private $pcUrl;
  30. /**
  31. * 待办的pc打开方式。2表示在pc端打开,4表示在浏览器打开
  32. **/
  33. private $pcOpenType;
  34. /**
  35. * 待办来源名称
  36. **/
  37. private $sourceName;
  38. /**
  39. * 标题
  40. **/
  41. private $title;
  42. /**
  43. * 待办跳转url
  44. **/
  45. private $url;
  46. /**
  47. * 用户id
  48. **/
  49. private $userid;
  50. private $apiParas = array();
  51. public function setBizId($bizId)
  52. {
  53. $this->bizId = $bizId;
  54. $this->apiParas["biz_id"] = $bizId;
  55. }
  56. public function getBizId()
  57. {
  58. return $this->bizId;
  59. }
  60. public function setCreateTime($createTime)
  61. {
  62. $this->createTime = $createTime;
  63. $this->apiParas["create_time"] = $createTime;
  64. }
  65. public function getCreateTime()
  66. {
  67. return $this->createTime;
  68. }
  69. public function setFormItemList($formItemList)
  70. {
  71. $this->formItemList = $formItemList;
  72. $this->apiParas["formItemList"] = $formItemList;
  73. }
  74. public function getFormItemList()
  75. {
  76. return $this->formItemList;
  77. }
  78. public function setOriginatorUserId($originatorUserId)
  79. {
  80. $this->originatorUserId = $originatorUserId;
  81. $this->apiParas["originator_user_id"] = $originatorUserId;
  82. }
  83. public function getOriginatorUserId()
  84. {
  85. return $this->originatorUserId;
  86. }
  87. public function setPcUrl($pcUrl)
  88. {
  89. $this->pcUrl = $pcUrl;
  90. $this->apiParas["pcUrl"] = $pcUrl;
  91. }
  92. public function getPcUrl()
  93. {
  94. return $this->pcUrl;
  95. }
  96. public function setPcOpenType($pcOpenType)
  97. {
  98. $this->pcOpenType = $pcOpenType;
  99. $this->apiParas["pc_open_type"] = $pcOpenType;
  100. }
  101. public function getPcOpenType()
  102. {
  103. return $this->pcOpenType;
  104. }
  105. public function setSourceName($sourceName)
  106. {
  107. $this->sourceName = $sourceName;
  108. $this->apiParas["source_name"] = $sourceName;
  109. }
  110. public function getSourceName()
  111. {
  112. return $this->sourceName;
  113. }
  114. public function setTitle($title)
  115. {
  116. $this->title = $title;
  117. $this->apiParas["title"] = $title;
  118. }
  119. public function getTitle()
  120. {
  121. return $this->title;
  122. }
  123. public function setUrl($url)
  124. {
  125. $this->url = $url;
  126. $this->apiParas["url"] = $url;
  127. }
  128. public function getUrl()
  129. {
  130. return $this->url;
  131. }
  132. public function setUserid($userid)
  133. {
  134. $this->userid = $userid;
  135. $this->apiParas["userid"] = $userid;
  136. }
  137. public function getUserid()
  138. {
  139. return $this->userid;
  140. }
  141. public function getApiMethodName()
  142. {
  143. return "dingtalk.oapi.workrecord.add";
  144. }
  145. public function getApiParas()
  146. {
  147. return $this->apiParas;
  148. }
  149. public function check()
  150. {
  151. RequestCheckUtil::checkNotNull($this->createTime,"createTime");
  152. RequestCheckUtil::checkNotNull($this->title,"title");
  153. RequestCheckUtil::checkNotNull($this->url,"url");
  154. RequestCheckUtil::checkNotNull($this->userid,"userid");
  155. }
  156. public function putOtherTextParam($key, $value) {
  157. $this->apiParas[$key] = $value;
  158. $this->$key = $value;
  159. }
  160. }