gate.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. package v1
  2. import (
  3. "property-household-gateway/param/base"
  4. "property-household-gateway/pb/v1"
  5. )
  6. type GateListQuery struct {
  7. GardenId int64 `form:"garden_id" json:"garden_id"`
  8. }
  9. type GateListRequest struct {
  10. base.Header
  11. GateListQuery
  12. }
  13. type GateListResponse struct {
  14. base.Result
  15. Data v1.GateUnitDeviceReply `json:"data"`
  16. }
  17. type GateUserPicAddBody struct {
  18. GardenId int64 `form:"garden_id" json:"garden_id"`
  19. PicUrl string `form:"pic_url" json:"pic_url"`
  20. }
  21. type GateUserPicAddRequest struct {
  22. base.Header
  23. GateUserPicAddBody
  24. }
  25. type GateUserPicAddResponse struct {
  26. base.Result
  27. }
  28. type GateUserPicInfoQuery struct {
  29. GardenId int64 `form:"garden_id" json:"garden_id"`
  30. }
  31. type GateUserPicInfoRequest struct {
  32. base.Header
  33. GateUserPicInfoQuery
  34. }
  35. type GateUserPicInfoResponse struct {
  36. base.Result
  37. Data v1.GateUserPicInfoReply `json:"data"`
  38. }
  39. type GateHasFaceQuery struct {
  40. GardenId int64 `form:"garden_id" json:"garden_id"`
  41. }
  42. type GateHasFaceRequest struct {
  43. base.Header
  44. GateHasFaceQuery
  45. }
  46. type GateHasFaceData struct {
  47. HasFaceDevice bool `json:"has_face_device"`
  48. }
  49. type GateHasFaceResponse struct {
  50. base.Result
  51. Data GateHasFaceData `json:"data"`
  52. }
  53. type GateQcodeQuery struct {
  54. GardenId int64 `form:"garden_id" json:"garden_id"`
  55. //DeviceId string `form:"device_id" json:"device_id"`
  56. }
  57. type GateQcodeRequest struct {
  58. base.Header
  59. GateQcodeQuery
  60. }
  61. type GateQcodeResponse struct {
  62. base.Result
  63. Data v1.GateQcodeReply `json:"data"`
  64. }
  65. type GateQcodeVisitorQuery struct {
  66. GardenId int64 `form:"garden_id" json:"garden_id"`
  67. DeviceId int64 `form:"device_id" json:"device_id"`
  68. Start int64 `form:"start" json:"start"`
  69. End int64 `form:"end" json:"end"`
  70. VisitorPhone string `form:"visitor_phone" json:"visitor_phone"`
  71. VisitorName string `form:"visitor_name" json:"visitor_name"`
  72. Comment string `form:"comment" json:"comment"`
  73. }
  74. type GateQcodeVisitorRequest struct {
  75. base.Header
  76. GateQcodeVisitorQuery
  77. }
  78. type GateQcodeVisitorResponse struct {
  79. base.Result
  80. Data v1.GateQcodeReply `json:"data"`
  81. }
  82. type GateVisitorListQuery struct {
  83. Page int64 `form:"page" json:"page"`
  84. PageSize int64 `form:"page_size" json:"page_size"`
  85. GateId int64 `form:"gate_id" json:"gate_id"`
  86. //User string `form:"user"`
  87. //Visitor string `form:"visitor"`
  88. //Start int64 `form:"start"`
  89. //End int64 `form:"end"`
  90. }
  91. type GateVisitorListRequest struct {
  92. base.Header
  93. GateVisitorListQuery
  94. }
  95. type GateVisitorListResponse struct {
  96. base.Result
  97. Data v1.GateVisitorListReply `json:"data"`
  98. }
  99. type GateVisitorDelQuery struct {
  100. Id int64 `form:"id" json:"id"`
  101. }
  102. type GateVisitorDelRequest struct {
  103. base.Header
  104. GateVisitorDelQuery
  105. }
  106. type GateVisitorDelResponse struct {
  107. base.Result
  108. }
  109. type GateVisitorPageQuery struct {
  110. Id int64 `form:"id"`
  111. }
  112. type GateVisitorPageRequest struct {
  113. GateVisitorPageQuery
  114. }
  115. type GateVisitorPageResponse struct {
  116. base.Result
  117. Data v1.GateVisitorListItem `json:"data"`
  118. }