OapiAttendanceRecordUploadRequest.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.attendance.record.upload request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.06.04
  7. */
  8. class OapiAttendanceRecordUploadRequest
  9. {
  10. /**
  11. * 设备唯一标识
  12. **/
  13. private $deviceId;
  14. /**
  15. * 打卡设备名称
  16. **/
  17. private $deviceName;
  18. /**
  19. * 打卡备注图片地址,必须是公网可访问的地址
  20. **/
  21. private $photoUrl;
  22. /**
  23. * 员工打卡的时间
  24. **/
  25. private $userCheckTime;
  26. /**
  27. * 员工id
  28. **/
  29. private $userid;
  30. private $apiParas = array();
  31. public function setDeviceId($deviceId)
  32. {
  33. $this->deviceId = $deviceId;
  34. $this->apiParas["device_id"] = $deviceId;
  35. }
  36. public function getDeviceId()
  37. {
  38. return $this->deviceId;
  39. }
  40. public function setDeviceName($deviceName)
  41. {
  42. $this->deviceName = $deviceName;
  43. $this->apiParas["device_name"] = $deviceName;
  44. }
  45. public function getDeviceName()
  46. {
  47. return $this->deviceName;
  48. }
  49. public function setPhotoUrl($photoUrl)
  50. {
  51. $this->photoUrl = $photoUrl;
  52. $this->apiParas["photo_url"] = $photoUrl;
  53. }
  54. public function getPhotoUrl()
  55. {
  56. return $this->photoUrl;
  57. }
  58. public function setUserCheckTime($userCheckTime)
  59. {
  60. $this->userCheckTime = $userCheckTime;
  61. $this->apiParas["user_check_time"] = $userCheckTime;
  62. }
  63. public function getUserCheckTime()
  64. {
  65. return $this->userCheckTime;
  66. }
  67. public function setUserid($userid)
  68. {
  69. $this->userid = $userid;
  70. $this->apiParas["userid"] = $userid;
  71. }
  72. public function getUserid()
  73. {
  74. return $this->userid;
  75. }
  76. public function getApiMethodName()
  77. {
  78. return "dingtalk.oapi.attendance.record.upload";
  79. }
  80. public function getApiParas()
  81. {
  82. return $this->apiParas;
  83. }
  84. public function check()
  85. {
  86. RequestCheckUtil::checkNotNull($this->deviceId,"deviceId");
  87. RequestCheckUtil::checkNotNull($this->deviceName,"deviceName");
  88. RequestCheckUtil::checkNotNull($this->userCheckTime,"userCheckTime");
  89. RequestCheckUtil::checkNotNull($this->userid,"userid");
  90. }
  91. public function putOtherTextParam($key, $value) {
  92. $this->apiParas[$key] = $value;
  93. $this->$key = $value;
  94. }
  95. }