48 lines
1.4 KiB
48 lines
1.4 KiB
9 months ago
|
package request
|
||
|
|
||
|
import "pure-admin/model"
|
||
|
|
||
|
// User register structure
|
||
|
type Register struct {
|
||
|
Username string `json:"userName"`
|
||
|
Phone string `json:"phone"`
|
||
|
Password string `json:"passWord"`
|
||
|
NickName string `json:"nickName" gorm:"default:'QMPlusUser'"`
|
||
|
HeaderImg string `json:"headerImg" gorm:"default:'http://www.henrongyi.top/avatar/lufu.jpg'"`
|
||
|
AuthorityId uint `json:"authorityId" gorm:"default:888"`
|
||
|
AuthorityIds []uint `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
|
||
|
Appid string `json:"appid"` // 应用ID
|
||
|
}
|
||
|
|
||
|
// Modify user's auth structure
|
||
|
type SetUserAuthorities struct {
|
||
|
UUID string `json:"uuid"`
|
||
|
AuthorityIds []string `json:"authorityIds"` // 角色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 {
|
||
|
//UUID uuid.UUID `json:"uuid"` // 用户UUID
|
||
|
AuthorityId string `json:"authorityId"` // 角色ID
|
||
|
}
|
||
|
|
||
|
type SearchSysUserParams struct {
|
||
|
model.SysUser
|
||
|
PageInfo
|
||
|
}
|