user.go 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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-supplier-management-gateway/param/base"
  6. "smart-supplier-management-gateway/pb/v1"
  7. )
  8. type RegisterBody struct {
  9. // 供应商名称
  10. Name string `gorm:"column:name" json:"name" form:"name"`
  11. // 社会信用码
  12. SocialCode string `gorm:"column:social_code" json:"social_code" form:"social_code"`
  13. // 法人
  14. LegalPerson string `gorm:"column:legal_person" json:"legal_person" form:"legal_person"`
  15. // 身份证
  16. IdCert string `gorm:"column:id_cert" json:"id_cert" form:"id_cert"`
  17. // 企业所属 0,省内 1 省外 省外企业须上传业务负责人任命书
  18. EnterpriseLocation int32 `gorm:"column:enterprise_location" json:"enterprise_location" form:"enterprise_location"`
  19. // 营业执照
  20. BusinessLicense []string `gorm:"column:business_license" json:"business_license" form:"business_license"`
  21. // 诚信经营承诺书
  22. IntegrityManagementLetter []string `gorm:"column:integrity_management_letter" json:"integrity_management_letter" form:"integrity_management_letter"`
  23. // 法人授权书
  24. LegalPersonLetter []string `gorm:"column:legal_person_letter" json:"legal_person_letter" form:"legal_person_letter"`
  25. // 业务负责人任命书
  26. BusinessResponsibleLetter []string `gorm:"column:business_responsible_letter" json:"business_responsible_letter" form:"business_responsible_letter"`
  27. // 登录名
  28. UserName string `gorm:"column:user_name" json:"user_name" form:"user_name"`
  29. // 密码
  30. Passwd string `gorm:"column:passwd" json:"passwd" form:"passwd"`
  31. // 业务联系人
  32. BusinessContact string `gorm:"column:business_contact" json:"business_contact" form:"business_contact"`
  33. // 业务联系人电话
  34. BusinessContactPhone string `gorm:"column:business_contact_phone" json:"business_contact_phone" form:"business_contact_phone"`
  35. // 业务负责人
  36. BusinessResponsible string `gorm:"column:business_responsible" json:"business_responsible" form:"business_responsible"`
  37. // 业务负责人电话
  38. BusinessResponsiblePhone string `gorm:"column:business_responsible_phone" json:"business_responsible_phone" form:"business_responsible_phone"`
  39. // 应急联系人
  40. EmergencyContact string `gorm:"column:emergency_contact" json:"emergency_contact" form:"emergency_contact"`
  41. EmergencyContactPhone string `gorm:"column:emergency_contact_phone" json:"emergency_contact_phone" form:"emergency_contact_phone"`
  42. // 验证码
  43. Verify string `form:"verify"`
  44. }
  45. type RegisterRequest struct {
  46. RegisterBody
  47. }
  48. type RegisterResponse struct {
  49. base.Result
  50. Data v1.RegisterReply `json:"data"`
  51. }
  52. type LoginBody struct {
  53. User string `form:"user"`
  54. Password string `form:"password"`
  55. Verify string `form:"verify"`
  56. Captcha string `form:"captcha"`
  57. }
  58. type LoginRequest struct {
  59. LoginBody
  60. }
  61. type LoginData struct {
  62. Uid int64 `json:"uid"`
  63. Token string `json:"token"`
  64. RefreshToken string `json:"refresh_token"`
  65. }
  66. type LoginResponse struct {
  67. base.Result
  68. Data LoginData `json:"data"`
  69. }
  70. type TokenRequest struct {
  71. base.Header
  72. }
  73. type TokenResponse struct {
  74. base.Result
  75. Data string `json:"data"`
  76. }
  77. type PublicityQuery struct {
  78. DeviceCode int `form:"device_code"`
  79. Provider string `form:"provider"`
  80. }
  81. type PublicityRequest struct {
  82. PublicityQuery
  83. }
  84. type PublicityItem struct {
  85. Name string `json:"name"`
  86. SocialCode string `json:"social_code"`
  87. }
  88. type PublicityData struct {
  89. List []PublicityItem `json:"list"`
  90. }
  91. type PublicityResponse struct {
  92. base.Result
  93. Data PublicityData `json:"data"`
  94. }
  95. type VcodeQuery struct {
  96. Phone string `form:"phone"`
  97. }
  98. type VcodeRequest struct {
  99. VcodeQuery
  100. }
  101. type VcodeResponse struct {
  102. base.Result
  103. Data v1.GetVcodeReply `json:"data"`
  104. }
  105. type FindPasswdVerifyBody struct {
  106. Phone string `form:"phone"`
  107. Verify string `form:"verify"`
  108. Vcode uint32 `form:"vcode"`
  109. Captcha string `form:"captcha"`
  110. }
  111. type FindPasswdVerifyRequest struct {
  112. FindPasswdVerifyBody
  113. }
  114. type FindPasswdVerifyResponse struct {
  115. base.Result
  116. }
  117. type SetPasswdBody struct {
  118. Phone string `form:"phone"`
  119. Passwd string `form:"passwd"`
  120. Vcode int32 `form:"vcode"`
  121. }
  122. type SetPasswdRequest struct {
  123. SetPasswdBody
  124. }
  125. type SetPasswdResponse struct {
  126. base.Result
  127. }
  128. type ProviderApproveStatusQuery struct {
  129. SocialCode string `form:"social_code"`
  130. }
  131. type ProviderApproveStatusRequest struct {
  132. base.Header
  133. ProviderApproveStatusQuery
  134. }
  135. type ProviderApproveStatusResponse struct {
  136. base.Result
  137. Data v1.ProviderApproveStatusReply `json:"data"`
  138. }
  139. type ChangePasswdBody struct {
  140. Old string `form:"old"`
  141. New string `form:"new"`
  142. }
  143. type ChangePasswdRequest struct {
  144. base.Header
  145. ChangePasswdBody
  146. }
  147. type ChangePasswdResponse struct {
  148. base.Result
  149. }
  150. type LogListQuery struct {
  151. Page int32 `form:"page"`
  152. Start int64 `form:"start"`
  153. End int64 `form:"end"`
  154. }
  155. type LogListRequest struct {
  156. base.Header
  157. LogListQuery
  158. }
  159. type LogListResponse struct {
  160. base.Result
  161. Data v1.LogListReply `json:"data"`
  162. }
  163. type CaptchaIdRequest struct {
  164. }
  165. type CaptchaIdData struct {
  166. CaptureId string `json:"capture_id"`
  167. }
  168. type CaptchaIdResponse struct {
  169. base.Result
  170. Data CaptchaIdData `json:"data"`
  171. }
  172. type CaptchaPngPath struct {
  173. CaptchaId string `uri:"captcha_id"`
  174. }
  175. type CaptchaPngRequest struct {
  176. CaptchaPngPath
  177. }
  178. type CaptchaPngResponse struct {
  179. }
  180. type MailUpdateQuery struct {
  181. Token string `form:"token"`
  182. }
  183. type MailUpdateRequest struct {
  184. MailUpdateQuery
  185. }
  186. type MailUpdateResponse struct {
  187. base.Result
  188. }
  189. type MailPrepareBody struct {
  190. Email string `form:"email"`
  191. Password string `form:"password"`
  192. }
  193. type MailPrepareRequest struct {
  194. base.Header
  195. MailPrepareBody
  196. }
  197. type MailPrepareResponse struct {
  198. base.Result
  199. }
  200. type PhoneUpdateBody struct {
  201. Phone string `form:"phone"`
  202. Vcode uint32 `form:"vcode"`
  203. }
  204. type PhoneUpdateRequest struct {
  205. base.Header
  206. PhoneUpdateBody
  207. }
  208. type PhoneUpdateResponse struct {
  209. base.Result
  210. }
  211. type UserInfoRequest struct {
  212. base.Header
  213. }
  214. type UserInfoResponse struct {
  215. base.Result
  216. Data v1.UserInfoReply `json:"data"`
  217. }