s_login.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package schema
  2. // LoginParam 登录参数
  3. type LoginParam struct {
  4. UserName string `json:"user_name" binding:"required"` // 用户名
  5. Password string `json:"password" binding:"required"` // 密码(md5加密)
  6. CaptchaID string `json:"captcha_id" binding:"required"` // 验证码ID
  7. CaptchaCode string `json:"captcha_code" binding:"required"` // 验证码
  8. }
  9. // LoginByPhoneParam 手机号登录参数
  10. type LoginByPhoneParam struct {
  11. Phone string `json:"phone" binding:"required"` // 手机号
  12. Password string `json:"password" binding:"required"` // 密码(md5加密)
  13. }
  14. // SmsLoginParam 短信登录参数
  15. type SmsLoginParam struct {
  16. Phone string `json:"phone" v:"phone"` // 电话
  17. Code string `json:"code" v:"required"` // 验证码
  18. BusinessType int `json:"business_type"` // 业务类型
  19. }
  20. // UpdatePassParams 修改密码参数
  21. type UpdatePassParams struct {
  22. Phone string `json:"phone" v:"phone"` // 电话
  23. Code string `json:"code" v:"required"` // 验证码
  24. BusinessType int `json:"business_type"` // 业务类型
  25. NewPassword string `json:"new_password" v:"required"` //新密码(md5加密)
  26. }
  27. // UserLoginInfo 用户登录信息
  28. type UserLoginInfo struct {
  29. UserName string `json:"user_name"` // 用户名
  30. RealName string `json:"real_name"` // 真实姓名
  31. Photo string `json:"photo"` // 头像
  32. }
  33. // UpdatePasswordParam 更新密码请求参数
  34. type UpdatePasswordParam struct {
  35. OldPassword string `json:"old_password" binding:"required"` // 旧密码(md5加密)
  36. NewPassword string `json:"new_password" binding:"required"` //新密码(md5加密)
  37. }
  38. // LoginCaptcha 登录验证码
  39. type LoginCaptcha struct {
  40. CaptchaID string `json:"captcha_id"` // 验证码ID
  41. }
  42. // LoginTokenInfo 登录令牌信息
  43. type LoginTokenInfo struct {
  44. AccessToken string `json:"access_token"` // 访问令牌
  45. TokenType string `json:"token_type"` // 令牌类型
  46. ExpiresAt int64 `json:"expires_at"` // 令牌到期时间
  47. AppFirstLogin bool `json:"app_first_login"` // app是否首次登录
  48. }
  49. // SetPasswordParam struct { 设置密码请求参数
  50. type SetPasswordParam struct {
  51. Password string `json:"password" binding:"required"` //密码(md5加密)
  52. }