yufan.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. package v1
  2. type YuFanHeartBeatResponse struct {
  3. Result bool `json:"result"`
  4. }
  5. type CallbackResponse struct {
  6. Result int32 `json:"result"`
  7. Success bool `json:"success"`
  8. }
  9. type QcodeCallbackResponse struct {
  10. TttsModeContent string `json:"ttsModContent"`
  11. DisplayModContent string `json:"displayModContent"`
  12. IsOpenRelay int `json:"isOpenRelay"`
  13. }
  14. const (
  15. PersonRegersterTaskName = "person/create"
  16. PersonUpdateTaskName = "person/update"
  17. PersonDelTaskName = "person/delete"
  18. PhotoRegisterByUrlTaskName = "face/createByUrl"
  19. TakePhotoRegisterTaskName = "face/takeImg"
  20. PhotoDelTaskName = "face/delete"
  21. DeviceRebootTaskName = "restartDevice"
  22. DeviceOpenTaskName = "device/openDoorControl"
  23. )
  24. type PersonRegesterTask struct {
  25. TaskNo string `json:"taskNo"`
  26. InterfaceName string `json:"interfaceName"`
  27. Result bool `json:"result"`
  28. Person PersonRegesterData `json:"person"`
  29. }
  30. type PersonRegesterData struct {
  31. Id string `json:"id"`
  32. Name string `json:"name"`
  33. IdCardNum string `json:"idcardNum"`
  34. IdNumber string `json:"iDNumber"`
  35. FacePermission string `json:"facePermission"`
  36. IdCardPermission string `json:"idCardPermission"`
  37. FaceAndCardPermission string `json:"faceAndCardPermission"`
  38. IDPermission string `json:"iDPermission"`
  39. Tag string `json:"tag"`
  40. Phone string `json:"phone"`
  41. }
  42. type PersonUpdateTask struct {
  43. TaskNo string `json:"taskNo"`
  44. InterfaceName string `json:"interfaceName"`
  45. Result bool `json:"result"`
  46. Person PersonUpdateData `json:"person"`
  47. }
  48. type PersonUpdateData struct {
  49. Id string `json:"id"`
  50. Name string `json:"name"`
  51. IdCardNum string `json:"idcardNum"`
  52. IdNumber string `json:"iDNumber"`
  53. FacePermission string `json:"facePermission"`
  54. IdCardPermission string `json:"idCardPermission"`
  55. FaceAndCardPermission string `json:"faceAndCardPermission"`
  56. IDPermission string `json:"iDPermission"`
  57. Tag string `json:"tag"`
  58. Phone string `json:"phone"`
  59. }
  60. type PersonDelTask struct {
  61. TaskNo string `json:"taskNo"`
  62. InterfaceName string `json:"interfaceName"`
  63. Result bool `json:"result"`
  64. Id string `json:"id"`
  65. }
  66. type PhoneRegisterTask struct {
  67. TaskNo string `json:"taskNo"`
  68. InterfaceName string `json:"interfaceName"`
  69. Result bool `json:"result"`
  70. PhotoRegisterData
  71. }
  72. type PhotoRegisterData struct {
  73. PersonId string `json:"personId"`
  74. FaceId string `json:"faceId"`
  75. ImgUrl string `json:"imgUrl"`
  76. }
  77. type PhoneUpdateTask struct {
  78. TaskNo string `json:"taskNo"`
  79. InterfaceName string `json:"interfaceName"`
  80. Result bool `json:"result"`
  81. PhotoUpdateData
  82. }
  83. type PhotoUpdateData struct {
  84. PersonId string `json:"personId"`
  85. FaceId string `json:"faceId"`
  86. Url string `json:"url"`
  87. }
  88. type PhoneDelTask struct {
  89. TaskNo string `json:"taskNo"`
  90. InterfaceName string `json:"interfaceName"`
  91. Result bool `json:"result"`
  92. FaceId string `json:"faceId"`
  93. }
  94. type TaskPhotoRegister struct {
  95. TaskNo string `json:"taskNo"`
  96. InterfaceName string `json:"interfaceName"`
  97. Result bool `json:"result"`
  98. PersonId string `json:"personId"`
  99. }
  100. type DeviceRebootTask struct {
  101. TaskNo string `json:"taskNo"`
  102. InterfaceName string `json:"interfaceName"`
  103. Result bool `json:"result"`
  104. }
  105. type DeviceOpenTask struct {
  106. TaskNo string `json:"taskNo"`
  107. InterfaceName string `json:"interfaceName"`
  108. Result bool `json:"result"`
  109. // 1:开门 2:串口 3:韦根 4:表示自定义文字弹
  110. OType int32 `json:"type"`
  111. }