user.go 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package v1
  4. import (
  5. "property-household-gateway/param/base"
  6. "property-household-gateway/pb/v1"
  7. )
  8. type HouseholdHousesQuery struct {
  9. ForRent bool `form:"for_rent" json:"for_rent"`
  10. }
  11. type HouseholdHousesRequest struct {
  12. base.Header
  13. HouseholdHousesQuery
  14. }
  15. type HouseholdHousesResponse struct {
  16. base.Result
  17. Data v1.HouseholdHousesReply `json:"data"`
  18. }
  19. type HouseholdSpaceQuery struct {
  20. UserType int32 `form:"user_type" json:"user_type"`
  21. HouseId int64 `form:"house_id" json:"house_id"`
  22. GardenId int64 `form:"garden_id" json:"garden_id"`
  23. }
  24. type HouseholdSpaceRequest struct {
  25. base.Header
  26. HouseholdSpaceQuery
  27. }
  28. type HouseholdSpaceResponse struct {
  29. base.Result
  30. Data v1.ParkSpaceListReply `json:"data"`
  31. }
  32. type HouseholdVehicleQuery struct {
  33. GardenId int64 `form:"garden_id" json:"garden_id"`
  34. }
  35. type HouseholdVehicleRequest struct {
  36. base.Header
  37. HouseholdVehicleQuery
  38. }
  39. type HouseholdVehicleResponse struct {
  40. base.Result
  41. Data v1.VehicleListReply `json:"data"`
  42. }
  43. type LoginBody struct {
  44. Code string `form:"code"`
  45. // 手机号加密数据
  46. PhoneEncrypt string `form:"phone_encrypt" json:"phone_encrypt"`
  47. // 用户信息加密数据
  48. UserEncrypt string `form:"user_encrypt" json:"user_encrypt"`
  49. // 手机号加密初始向量
  50. PhoneIv string `form:"phone_iv" json:"phone_iv"`
  51. // 用户信息加密初始向量
  52. UserIv string `form:"user_iv" json:"user_iv"`
  53. }
  54. type LoginRequest struct {
  55. base.Header
  56. LoginBody
  57. }
  58. type LoginData struct {
  59. Uid int64 `json:"uid"`
  60. Token string `json:"token"`
  61. User string `json:"user"`
  62. OpenId string `json:"open_id"`
  63. Phone string `json:"phone"`
  64. // 头像
  65. Avatar string `json:"avatar"`
  66. OpenimId string `json:"openim_id"`
  67. NickName string `json:"nick_name"`
  68. }
  69. type LoginResponse struct {
  70. base.Result
  71. Data LoginData `json:"data"`
  72. }
  73. type TokenRequest struct {
  74. base.Header
  75. }
  76. type TokenResponse struct {
  77. base.Result
  78. Data string `json:"data"`
  79. RefreshToken string `json:"refresh_token"`
  80. }
  81. type RealNameAuthBody struct {
  82. RealName string `form:"real_name" json:"real_name"`
  83. IdType int32 `form:"id_type" json:"id_type"`
  84. IdNumber string `form:"id_number" json:"id_number"`
  85. }
  86. type RealNameAuthRequest struct {
  87. base.Header
  88. RealNameAuthBody
  89. }
  90. type RealNameAuthData struct {
  91. Token string
  92. }
  93. type RealNameAuthResponse struct {
  94. base.Result
  95. Data RealNameAuthData `json:"data"`
  96. }
  97. type UserUpdateNickNameBody struct {
  98. NickName string `form:"nick_name" json:"nick_name"`
  99. }
  100. type UserUpdateNickNameRequest struct {
  101. base.Header
  102. UserUpdateNickNameBody
  103. }
  104. type UserUpdateNickNameResponse struct {
  105. base.Result
  106. }
  107. type UserInfoRequest struct {
  108. base.Header
  109. }
  110. type UserInfoResponse struct {
  111. base.Result
  112. Data v1.UserInfoReply `json:"data"`
  113. }
  114. type OpenImTokenQuery struct {
  115. OpenimId string `form:"openim_id" json:"openim_id"`
  116. }
  117. type OpenImTokenRequest struct {
  118. base.Header
  119. OpenImTokenQuery
  120. }
  121. type OpenImTokenResponse struct {
  122. base.Header
  123. Data v1.OpenImTokenReply `json:"data"`
  124. }
  125. type OpenImUsersInfoQuery struct {
  126. OpenimIds string `form:"openim_ids" json:"openim_ids"`
  127. }
  128. type OpenImUsersInfoRequest struct {
  129. base.Header
  130. OpenImUsersInfoQuery
  131. }
  132. type OpenImUsersInfoResponse struct {
  133. base.Result
  134. Data v1.OpenImUserInfoReply `json:"data"`
  135. }