OapiUserCreateRequest.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.user.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.06.08
  7. */
  8. class OapiUserCreateRequest
  9. {
  10. /**
  11. * 数组类型,数组里面值为整型,成员所属部门id列表
  12. **/
  13. private $department;
  14. /**
  15. * 邮箱。长度为0~64个字符。企业内必须唯一,不可重复
  16. **/
  17. private $email;
  18. /**
  19. * 扩展属性,可以设置多种属性(但手机上最多只能显示10个扩展属性,具体显示哪些属性,请到OA管理后台->设置->通讯录信息设置和OA管理后台->设置->手机端显示信息设置)
  20. **/
  21. private $extattr;
  22. /**
  23. * 入职时间
  24. **/
  25. private $hiredDate;
  26. /**
  27. * 是否号码隐藏, true表示隐藏, false表示不隐藏。隐藏手机号后,手机号在个人资料页隐藏,但仍可对其发DING、发起钉钉免费商务电话。
  28. **/
  29. private $isHide;
  30. /**
  31. * 是否高管模式,true表示是,false表示不是。开启后,手机号码对所有员工隐藏。普通员工无法对其发DING、发起钉钉免费商务电话。高管之间不受影响。
  32. **/
  33. private $isSenior;
  34. /**
  35. * 员工工号。对应显示到OA后台和客户端个人资料的工号栏目。长度为0~64个字符
  36. **/
  37. private $jobnumber;
  38. /**
  39. * 手机号码,企业内必须唯一,不可重复
  40. **/
  41. private $mobile;
  42. /**
  43. * 成员名称。长度为1~64个字符
  44. **/
  45. private $name;
  46. /**
  47. * 在对应的部门中的排序, Map结构的json字符串, key是部门的Id, value是人员在这个部门的排序值
  48. **/
  49. private $orderInDepts;
  50. /**
  51. * 员工的企业邮箱,员工的企业邮箱已开通,才能增加此字段, 否则会报错
  52. **/
  53. private $orgEmail;
  54. /**
  55. * 职位信息。长度为0~64个字符
  56. **/
  57. private $position;
  58. /**
  59. * 在对应的部门中的职位信息, Map结构的json字符串, key是部门的Id, value是人员在这个部门的职位
  60. **/
  61. private $positionInDepts;
  62. /**
  63. * 备注,长度为0~1000个字符
  64. **/
  65. private $remark;
  66. /**
  67. * 分机号,长度为0~50个字符,企业内必须唯一,不可重复
  68. **/
  69. private $tel;
  70. /**
  71. * 员工唯一标识ID(不可修改),企业内必须唯一。长度为1~64个字符,如果不传,服务器将自动生成一个userid
  72. **/
  73. private $userid;
  74. /**
  75. * 办公地点,长度为0~50个字符
  76. **/
  77. private $workPlace;
  78. private $apiParas = array();
  79. public function setDepartment($department)
  80. {
  81. $this->department = $department;
  82. $this->apiParas["department"] = $department;
  83. }
  84. public function getDepartment()
  85. {
  86. return $this->department;
  87. }
  88. public function setEmail($email)
  89. {
  90. $this->email = $email;
  91. $this->apiParas["email"] = $email;
  92. }
  93. public function getEmail()
  94. {
  95. return $this->email;
  96. }
  97. public function setExtattr($extattr)
  98. {
  99. $this->extattr = $extattr;
  100. $this->apiParas["extattr"] = $extattr;
  101. }
  102. public function getExtattr()
  103. {
  104. return $this->extattr;
  105. }
  106. public function setHiredDate($hiredDate)
  107. {
  108. $this->hiredDate = $hiredDate;
  109. $this->apiParas["hiredDate"] = $hiredDate;
  110. }
  111. public function getHiredDate()
  112. {
  113. return $this->hiredDate;
  114. }
  115. public function setIsHide($isHide)
  116. {
  117. $this->isHide = $isHide;
  118. $this->apiParas["isHide"] = $isHide;
  119. }
  120. public function getIsHide()
  121. {
  122. return $this->isHide;
  123. }
  124. public function setIsSenior($isSenior)
  125. {
  126. $this->isSenior = $isSenior;
  127. $this->apiParas["isSenior"] = $isSenior;
  128. }
  129. public function getIsSenior()
  130. {
  131. return $this->isSenior;
  132. }
  133. public function setJobnumber($jobnumber)
  134. {
  135. $this->jobnumber = $jobnumber;
  136. $this->apiParas["jobnumber"] = $jobnumber;
  137. }
  138. public function getJobnumber()
  139. {
  140. return $this->jobnumber;
  141. }
  142. public function setMobile($mobile)
  143. {
  144. $this->mobile = $mobile;
  145. $this->apiParas["mobile"] = $mobile;
  146. }
  147. public function getMobile()
  148. {
  149. return $this->mobile;
  150. }
  151. public function setName($name)
  152. {
  153. $this->name = $name;
  154. $this->apiParas["name"] = $name;
  155. }
  156. public function getName()
  157. {
  158. return $this->name;
  159. }
  160. public function setOrderInDepts($orderInDepts)
  161. {
  162. $this->orderInDepts = $orderInDepts;
  163. $this->apiParas["orderInDepts"] = $orderInDepts;
  164. }
  165. public function getOrderInDepts()
  166. {
  167. return $this->orderInDepts;
  168. }
  169. public function setOrgEmail($orgEmail)
  170. {
  171. $this->orgEmail = $orgEmail;
  172. $this->apiParas["orgEmail"] = $orgEmail;
  173. }
  174. public function getOrgEmail()
  175. {
  176. return $this->orgEmail;
  177. }
  178. public function setPosition($position)
  179. {
  180. $this->position = $position;
  181. $this->apiParas["position"] = $position;
  182. }
  183. public function getPosition()
  184. {
  185. return $this->position;
  186. }
  187. public function setPositionInDepts($positionInDepts)
  188. {
  189. $this->positionInDepts = $positionInDepts;
  190. $this->apiParas["positionInDepts"] = $positionInDepts;
  191. }
  192. public function getPositionInDepts()
  193. {
  194. return $this->positionInDepts;
  195. }
  196. public function setRemark($remark)
  197. {
  198. $this->remark = $remark;
  199. $this->apiParas["remark"] = $remark;
  200. }
  201. public function getRemark()
  202. {
  203. return $this->remark;
  204. }
  205. public function setTel($tel)
  206. {
  207. $this->tel = $tel;
  208. $this->apiParas["tel"] = $tel;
  209. }
  210. public function getTel()
  211. {
  212. return $this->tel;
  213. }
  214. public function setUserid($userid)
  215. {
  216. $this->userid = $userid;
  217. $this->apiParas["userid"] = $userid;
  218. }
  219. public function getUserid()
  220. {
  221. return $this->userid;
  222. }
  223. public function setWorkPlace($workPlace)
  224. {
  225. $this->workPlace = $workPlace;
  226. $this->apiParas["workPlace"] = $workPlace;
  227. }
  228. public function getWorkPlace()
  229. {
  230. return $this->workPlace;
  231. }
  232. public function getApiMethodName()
  233. {
  234. return "dingtalk.oapi.user.create";
  235. }
  236. public function getApiParas()
  237. {
  238. return $this->apiParas;
  239. }
  240. public function check()
  241. {
  242. }
  243. public function putOtherTextParam($key, $value) {
  244. $this->apiParas[$key] = $value;
  245. $this->$key = $value;
  246. }
  247. }