You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

  1. package request
  2. // User register structure
  3. type Register struct {
  4. Username string `json:"userName"`
  5. Password string `json:"passWord"`
  6. NickName string `json:"nickName" gorm:"default:'QMPlusUser'"`
  7. HeaderImg string `json:"headerImg" gorm:"default:'http://www.henrongyi.top/avatar/lufu.jpg'"`
  8. AuthorityId string `json:"authorityId" gorm:"default:888"`
  9. AuthorityIds []string `json:"authorityIds"`
  10. }
  11. // User login structure
  12. type Login struct {
  13. Username string `json:"username"` // 用户名
  14. Password string `json:"password"` // 密码
  15. Captcha string `json:"captcha"` // 验证码
  16. CaptchaId string `json:"captchaId"` // 验证码ID
  17. }
  18. // Modify password structure
  19. type ChangePasswordStruct struct {
  20. Username string `json:"username"` // 用户名
  21. Password string `json:"password"` // 密码
  22. NewPassword string `json:"newPassword"` // 新密码
  23. }
  24. // Modify user's auth structure
  25. type SetUserAuth struct {
  26. AuthorityId string `json:"authorityId"` // 角色ID
  27. }
  28. // Modify user's auth structure
  29. type SetUserAuthorities struct {
  30. ID uint
  31. AuthorityIds []string `json:"authorityIds"` // 角色ID
  32. }