2021-10-29 14:39:50 +08:00
|
|
|
package request
|
|
|
|
|
|
|
|
// User register structure
|
|
|
|
type Register struct {
|
|
|
|
Username string `json:"userName"`
|
|
|
|
Password string `json:"passWord"`
|
|
|
|
NickName string `json:"nickName" gorm:"default:'QMPlusUser'"`
|
|
|
|
HeaderImg string `json:"headerImg" gorm:"default:'https://qmplusimg.henrongyi.top/gva_header.jpg'"`
|
|
|
|
AuthorityId string `json:"authorityId" gorm:"default:888"`
|
|
|
|
AuthorityIds []string `json:"authorityIds"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// User login structure
|
|
|
|
type Login struct {
|
|
|
|
Username string `json:"username"` // 用户名
|
|
|
|
Password string `json:"password"` // 密码
|
|
|
|
Captcha string `json:"captcha"` // 验证码
|
|
|
|
CaptchaId string `json:"captchaId"` // 验证码ID
|
|
|
|
}
|
|
|
|
|
|
|
|
// Modify password structure
|
|
|
|
type ChangePasswordStruct struct {
|
|
|
|
Username string `json:"username"` // 用户名
|
|
|
|
Password string `json:"password"` // 密码
|
|
|
|
NewPassword string `json:"newPassword"` // 新密码
|
|
|
|
}
|
|
|
|
|
|
|
|
// Modify user's auth structure
|
|
|
|
type SetUserAuth struct {
|
|
|
|
AuthorityId string `json:"authorityId"` // 角色ID
|
|
|
|
}
|
|
|
|
|
|
|
|
// Modify user's auth structure
|
|
|
|
type SetUserAuthorities struct {
|
|
|
|
ID uint
|
|
|
|
AuthorityIds []string `json:"authorityIds"` // 角色ID
|
|
|
|
}
|
2021-11-04 19:39:59 +08:00
|
|
|
|
|
|
|
type SetUserInfo struct {
|
|
|
|
ID uint
|
|
|
|
Username string `json:"userName" gorm:"comment:用户登录名"` // 用户登录名
|
|
|
|
Password string `json:"password" gorm:"comment:用户登录密码"` // 用户登录密码
|
|
|
|
NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称
|
|
|
|
AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID
|
|
|
|
}
|