gate.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. package v1
  2. import (
  3. "property-applete-gateway/param/base"
  4. "property-applete-gateway/pb/v1"
  5. )
  6. type GateListQuery struct {
  7. Page int64 `form:"page" json:"page"`
  8. PageSize int64 `form:"page_size" json:"page_size"`
  9. }
  10. type GateListRequest struct {
  11. base.Header
  12. GateListQuery
  13. }
  14. type GateListResponse struct {
  15. base.Result
  16. Data v1.GateListReply `json:"data"`
  17. }
  18. type GateEnableBody struct {
  19. DeviceId string `form:"device_id" json:"device_id"`
  20. // true 启用 false 停用
  21. Enable bool `form:"enable" json:"enable"`
  22. }
  23. type GateEnableRequest struct {
  24. base.Header
  25. GateEnableBody
  26. }
  27. type GateEnableResponse struct {
  28. base.Result
  29. }
  30. type GateSetBody struct {
  31. DeviceId string `form:"device_id" json:"device_id"`
  32. // 1 进场 2 出场 3 进出场
  33. Direction int32 `form:"direction" json:"direction"`
  34. // 位置
  35. Location string `form:"location" json:"location"`
  36. }
  37. type GateSetRequest struct {
  38. base.Header
  39. GateSetBody
  40. }
  41. type GateSetResponse struct {
  42. base.Result
  43. }
  44. type GateCardInfo struct {
  45. CardNumber string `form:"card_number" json:"card_number"`
  46. CardOwner string `form:"card_owner" json:"card_owner"`
  47. }
  48. type GateWhiteAddBody struct {
  49. DeviceId string `form:"device_id" json:"device_id"`
  50. // 业主uid和ic卡二选一
  51. HouseholdUids []int64 `form:"household_uids" json:"household_uids"`
  52. CardInfo []GateCardInfo `form:"card_info" json:"card_info"`
  53. }
  54. type GateWhiteAddRequest struct {
  55. base.Header
  56. GateWhiteAddBody
  57. }
  58. type GateWhiteAddResponse struct {
  59. base.Result
  60. }
  61. type GateWhiteDelQuery struct {
  62. Id int64 `form:"id" json:"id"`
  63. }
  64. type GateWhiteDelRequest struct {
  65. base.Header
  66. GateWhiteDelQuery
  67. }
  68. type GateWhiteDelResponse struct {
  69. base.Result
  70. }
  71. type GateWhiteHouseholdListQuery struct {
  72. Page int64 `form:"page" json:"page"`
  73. PageSize int64 `form:"page_size" json:"page_size"`
  74. DeviceId string `form:"device_id" json:"device_id"`
  75. }
  76. type GateWhiteHouseholdListRequest struct {
  77. base.Header
  78. GateWhiteHouseholdListQuery
  79. }
  80. type GateWhiteHouseholdListResponse struct {
  81. base.Result
  82. Data v1.GateWhiteHouseholdListReply `json:"data"`
  83. }
  84. type GateWhiteCardListQuery struct {
  85. Page int64 `form:"page" json:"page"`
  86. PageSize int64 `form:"page_size" json:"page_size"`
  87. DeviceId string `form:"device_id" json:"device_id"`
  88. }
  89. type GateWhiteCardListRequest struct {
  90. base.Header
  91. GateWhiteCardListQuery
  92. }
  93. type GateWhiteCardListResponse struct {
  94. base.Result
  95. Data v1.GateWhiteCardListReply `json:"data"`
  96. }
  97. type GateOpenBody struct {
  98. DeviceId string `form:"device_id" json:"device_id"`
  99. }
  100. type GateOpenRequest struct {
  101. base.Header
  102. GateOpenBody
  103. }
  104. type GateOpenResponse struct {
  105. base.Result
  106. }
  107. type GateRestartBody struct {
  108. DeviceId string `form:"device_id" json:"device_id"`
  109. }
  110. type GateRestartRequest struct {
  111. base.Header
  112. GateRestartBody
  113. }
  114. type GateRestartResponse struct {
  115. base.Result
  116. }
  117. type GateWhiteSyncBody struct {
  118. DeviceId string `form:"device_id" json:"device_id"`
  119. }
  120. type GateWhiteSyncRequest struct {
  121. base.Header
  122. GateWhiteSyncBody
  123. }
  124. type GateWhiteSyncResponse struct {
  125. base.Result
  126. }
  127. type GateCommandListQuery struct {
  128. Page int64 `form:"page" json:"page"`
  129. PageSize int64 `form:"page_size" json:"page_size"`
  130. DeviceId string `form:"device_id" json:"device_id"`
  131. }
  132. type GateCommandListRequest struct {
  133. base.Header
  134. GateCommandListQuery
  135. }
  136. type GateCommandListResponse struct {
  137. base.Result
  138. Data v1.GateCommandListReply `json:"data"`
  139. }