user.go 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  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. Verify bool `form:"verify"`
  98. }
  99. type VcodeRequest struct {
  100. VcodeQuery
  101. }
  102. type VcodeResponse struct {
  103. base.Result
  104. Data v1.GetVcodeReply `json:"data"`
  105. }
  106. type FindPasswdVerifyBody struct {
  107. Phone string `form:"phone"`
  108. Verify string `form:"verify"`
  109. Vcode uint32 `form:"vcode"`
  110. Captcha string `form:"captcha"`
  111. }
  112. type FindPasswdVerifyRequest struct {
  113. FindPasswdVerifyBody
  114. }
  115. type FindPasswdVerifyResponse struct {
  116. base.Result
  117. }
  118. type SetPasswdBody struct {
  119. Phone string `form:"phone"`
  120. Passwd string `form:"passwd"`
  121. Vcode int32 `form:"vcode"`
  122. }
  123. type SetPasswdRequest struct {
  124. SetPasswdBody
  125. }
  126. type SetPasswdResponse struct {
  127. base.Result
  128. }
  129. type ProviderApproveStatusQuery struct {
  130. SocialCode string `form:"social_code"`
  131. }
  132. type ProviderApproveStatusRequest struct {
  133. base.Header
  134. ProviderApproveStatusQuery
  135. }
  136. type ProviderApproveStatusResponse struct {
  137. base.Result
  138. Data v1.ProviderApproveStatusReply `json:"data"`
  139. }
  140. type ChangePasswdBody struct {
  141. Old string `form:"old"`
  142. New string `form:"new"`
  143. }
  144. type ChangePasswdRequest struct {
  145. base.Header
  146. ChangePasswdBody
  147. }
  148. type ChangePasswdResponse struct {
  149. base.Result
  150. }
  151. type LogListQuery struct {
  152. Page int32 `form:"page"`
  153. Start int64 `form:"start"`
  154. End int64 `form:"end"`
  155. }
  156. type LogListRequest struct {
  157. base.Header
  158. LogListQuery
  159. }
  160. type LogListResponse struct {
  161. base.Result
  162. Data v1.LogListReply `json:"data"`
  163. }
  164. type CaptchaIdRequest struct {
  165. }
  166. type CaptchaIdData struct {
  167. CaptureId string `json:"capture_id"`
  168. }
  169. type CaptchaIdResponse struct {
  170. base.Result
  171. Data CaptchaIdData `json:"data"`
  172. }
  173. type CaptchaPngPath struct {
  174. CaptchaId string `uri:"captcha_id"`
  175. }
  176. type CaptchaPngRequest struct {
  177. CaptchaPngPath
  178. }
  179. type CaptchaPngResponse struct {
  180. }
  181. type MailUpdateQuery struct {
  182. Token string `form:"token"`
  183. }
  184. type MailUpdateRequest struct {
  185. MailUpdateQuery
  186. }
  187. type MailUpdateResponse struct {
  188. base.Result
  189. }
  190. type MailPrepareBody struct {
  191. Email string `form:"email"`
  192. Password string `form:"password"`
  193. }
  194. type MailPrepareRequest struct {
  195. base.Header
  196. MailPrepareBody
  197. }
  198. type MailPrepareResponse struct {
  199. base.Result
  200. }
  201. type PhoneUpdateBody struct {
  202. Phone string `form:"phone"`
  203. Vcode uint32 `form:"vcode"`
  204. }
  205. type PhoneUpdateRequest struct {
  206. base.Header
  207. PhoneUpdateBody
  208. }
  209. type PhoneUpdateResponse struct {
  210. base.Result
  211. }
  212. type UserInfoRequest struct {
  213. base.Header
  214. }
  215. type UserInfoResponse struct {
  216. base.Result
  217. Data v1.UserInfoReply `json:"data"`
  218. }
  219. type ProviderInfoRequest struct {
  220. base.Header
  221. }
  222. type ProviderInfoResponse struct {
  223. base.Result
  224. Data v1.ProviderInfoReply `json:"data"`
  225. }