user.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. "smart-enterprise-management-gateway/param/base"
  6. "smart-enterprise-management-gateway/pb/v1"
  7. )
  8. type RegisterBody struct {
  9. // 公司名称
  10. Name string `form:"name" json:"name"`
  11. // 统一社会信用码
  12. SocialCode string `form:"social_code" json:"social_code"`
  13. // 法定代表人
  14. LegalPerson string `form:"legal_person" json:"legal_person"`
  15. // 证件号
  16. IdCert string `form:"id_cert" json:"id_cert"`
  17. // 营业执照
  18. BusinessLicense []string `form:"business_license" json:"business_license"`
  19. // 用户名
  20. UserName string `form:"user_name" json:"user_name"`
  21. // 密码
  22. Passwd string `form:"passwd" json:"passwd"`
  23. // 业务联系人
  24. BusinessContact string `form:"business_contact" json:"business_contact"`
  25. // 业务联系人电话
  26. BusinessContactPhone string `form:"business_contact_phone" json:"business_contact_phone"`
  27. // 业务负责人
  28. BusinessResponsible string `form:"business_responsible" json:"business_responsible"`
  29. // 业务负责人电话
  30. BusinessResponsiblePhone string `form:"business_responsible_phone" json:"business_responsible_phone"`
  31. EmergencyContact string `form:"emergency_contact" json:"emergency_contact"`
  32. EmergencyContactPhone string `form:"emergency_contact_phone" json:"emergency_contact_phone"`
  33. // 注册状态 0 待审核 1 通过 2 未通过
  34. Status int32 `form:"status" json:"status"`
  35. Province string `form:"province" json:"province"`
  36. City string `form:"city" json:"city"`
  37. Zone string `form:"zone" json:"zone"`
  38. Verify string `form:"verify"`
  39. }
  40. type RegisterRequest struct {
  41. RegisterBody
  42. }
  43. type RegisterResponse struct {
  44. base.Result
  45. Data v1.RegisterReply `json:"data"`
  46. }
  47. type LoginBody struct {
  48. User string `form:"user"`
  49. Password string `form:"password"`
  50. Verify string `form:"verify"`
  51. Captcha string `form:"captcha"`
  52. }
  53. type LoginRequest struct {
  54. LoginBody
  55. }
  56. type LoginData struct {
  57. Uid int64 `json:"uid"`
  58. Token string `json:"token"`
  59. RefreshToken string `json:"refresh_token"`
  60. }
  61. type LoginResponse struct {
  62. base.Result
  63. Data LoginData `json:"data"`
  64. }
  65. type TokenRequest struct {
  66. base.Header
  67. }
  68. type TokenResponse struct {
  69. base.Result
  70. Data string `json:"data"`
  71. }
  72. type VcodeQuery struct {
  73. Phone string `form:"phone"`
  74. }
  75. type VcodeRequest struct {
  76. VcodeQuery
  77. }
  78. type VcodeResponse struct {
  79. base.Result
  80. Data v1.GetVcodeReply `json:"data"`
  81. }
  82. type FindPasswdVerifyBody struct {
  83. Phone string `form:"phone"`
  84. Verify string `form:"verify"`
  85. Vcode uint32 `form:"vcode"`
  86. Captcha string `form:"captcha"`
  87. }
  88. type FindPasswdVerifyRequest struct {
  89. FindPasswdVerifyBody
  90. }
  91. type FindPasswdVerifyResponse struct {
  92. base.Result
  93. }
  94. type SetPasswdBody struct {
  95. Phone string `form:"phone"`
  96. Passwd string `form:"passwd"`
  97. Vcode uint32 `form:"vcode"`
  98. }
  99. type SetPasswdRequest struct {
  100. SetPasswdBody
  101. }
  102. type SetPasswdResponse struct {
  103. base.Result
  104. }
  105. type CompanyApproveStatusQuery struct {
  106. SocialCode string `form:"social_code"`
  107. }
  108. type CompanyApproveStatusRequest struct {
  109. base.Header
  110. CompanyApproveStatusQuery
  111. }
  112. type CompanyApproveStatusResponse struct {
  113. base.Result
  114. Data v1.CompanyApproveStatusReply `json:"data"`
  115. }
  116. type ChangePasswdBody struct {
  117. Old string `form:"old"`
  118. New string `form:"new"`
  119. }
  120. type ChangePasswdRequest struct {
  121. base.Header
  122. ChangePasswdBody
  123. }
  124. type ChangePasswdResponse struct {
  125. base.Result
  126. }
  127. type LogListQuery struct {
  128. Page int32 `form:"page"`
  129. Start int64 `form:"start"`
  130. End int64 `form:"end"`
  131. }
  132. type LogListRequest struct {
  133. base.Header
  134. LogListQuery
  135. }
  136. type LogListResponse struct {
  137. base.Result
  138. Data v1.LogListReply `json:"data"`
  139. }
  140. type CaptchaIdRequest struct {
  141. }
  142. type CaptchaIdData struct {
  143. CaptureId string `json:"capture_id"`
  144. }
  145. type CaptchaIdResponse struct {
  146. base.Result
  147. Data CaptchaIdData `json:"data"`
  148. }
  149. type CaptchaPngPath struct {
  150. CaptchaId string `uri:"captcha_id"`
  151. }
  152. type CaptchaPngRequest struct {
  153. CaptchaPngPath
  154. }
  155. type CaptchaPngResponse struct {
  156. }
  157. type MapReqeust struct {
  158. }
  159. type MapData struct {
  160. Url string `json:"url"`
  161. }
  162. type MapResponse struct {
  163. base.Result
  164. Data MapData `json:"data"`
  165. }
  166. type PublicityQuery struct {
  167. DeviceCode int `form:"device_code"`
  168. Provider string `form:"provider"`
  169. }
  170. type PublicityRequest struct {
  171. PublicityQuery
  172. }
  173. type PublicityItem struct {
  174. Name string `json:"name"`
  175. SocialCode string `json:"social_code"`
  176. }
  177. type PublicityData struct {
  178. List []PublicityItem `json:"list"`
  179. }
  180. type PublicityResponse struct {
  181. base.Result
  182. Data PublicityData `json:"data"`
  183. }
  184. type MailUpdateQuery struct {
  185. Token string `form:"token"`
  186. }
  187. type MailUpdateRequest struct {
  188. MailUpdateQuery
  189. }
  190. type MailUpdateResponse struct {
  191. base.Result
  192. }
  193. type MailPrepareBody struct {
  194. Email string `form:"email"`
  195. Password string `form:"password"`
  196. }
  197. type MailPrepareRequest struct {
  198. base.Header
  199. MailPrepareBody
  200. }
  201. type MailPrepareResponse struct {
  202. base.Result
  203. }
  204. type PhoneUpdateBody struct {
  205. Phone string `form:"phone"`
  206. Vcode uint32 `form:"vcode"`
  207. }
  208. type PhoneUpdateRequest struct {
  209. base.Header
  210. PhoneUpdateBody
  211. }
  212. type PhoneUpdateResponse struct {
  213. base.Result
  214. }
  215. type UserInfoRequest struct {
  216. base.Header
  217. }
  218. type UserInfoResponse struct {
  219. base.Result
  220. Data v1.UserInfoReply `json:"data"`
  221. }
  222. type TmpTokenQuery struct {
  223. ProjectId int64 `form:"project_id"`
  224. }
  225. type TmpTokenRequest struct{
  226. base.Header
  227. TmpTokenQuery
  228. }
  229. type TmpTokenData struct {
  230. Token string `json:"token"`
  231. }
  232. type TmpTokenResponse struct {
  233. base.Result
  234. Data TmpTokenData `json:"data"`
  235. }