|
|
package request
|
|
|
|
|
|
import (
|
|
|
model "ln/nft/model/app"
|
|
|
|
|
|
uuid "github.com/satori/go.uuid"
|
|
|
)
|
|
|
|
|
|
// User register structure
|
|
|
type Register struct {
|
|
|
// Username string `json:"userName"`
|
|
|
Email string `json:"email"`
|
|
|
Phone string `json:"phone"`
|
|
|
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 uint `json:"authorityId" gorm:"default:888"`
|
|
|
Enable int `json:"enable"`
|
|
|
AuthorityIds []uint `json:"authorityIds"`
|
|
|
}
|
|
|
|
|
|
// User login structure
|
|
|
type Login struct {
|
|
|
Email string `json:"email"`
|
|
|
Phone string `json:"phone"`
|
|
|
Password string `json:"password"` // 密码
|
|
|
Type int `json:"type"` // 1:密码登录 2:验证码登录
|
|
|
}
|
|
|
|
|
|
// Modify password structure
|
|
|
type ChangePasswordStruct struct {
|
|
|
Password string `json:"password"` // 密码
|
|
|
NewPassword string `json:"newPassword"` // 新密码
|
|
|
UUID uuid.UUID
|
|
|
}
|
|
|
|
|
|
// Modify user's auth structure
|
|
|
type SetUserAuth struct {
|
|
|
AuthorityId uint `json:"authorityId"` // 角色ID
|
|
|
}
|
|
|
|
|
|
// Modify user's auth structure
|
|
|
type SetUserAuthorities struct {
|
|
|
ID uint
|
|
|
AuthorityIds []uint `json:"authorityIds"` // 角色ID
|
|
|
}
|
|
|
|
|
|
type ChangeUserInfo struct {
|
|
|
ID uint `gorm:"primarykey"` // 主键ID
|
|
|
NickName string `json:"nickName" gorm:"default:系统用户;comment:用户昵称"` // 用户昵称
|
|
|
Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户角色ID
|
|
|
AuthorityIds []uint `json:"authorityIds" gorm:"-"` // 角色ID
|
|
|
Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱
|
|
|
HeaderImg string `json:"headerImg" gorm:"default:https://qmplusimg.henrongyi.top/gva_header.jpg;comment:用户头像"` // 用户头像
|
|
|
SideMode string `json:"sideMode" gorm:"comment:用户侧边主题"` // 用户侧边主题
|
|
|
Enable int `json:"enable" gorm:"comment:冻结用户"` //冻结用户
|
|
|
Authorities []model.Authority `json:"-" gorm:"many2many:sys_user_authority;"`
|
|
|
}
|