46 lines
1.5 KiB
Go
46 lines
1.5 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type BackUser struct {
|
|
ID int `gorm:"primaryKey;column:id" json:"-"` // 用户ID
|
|
Username string `gorm:"column:username" json:"username"` // 用户真实姓名
|
|
Password string `gorm:"column:password" json:"password"` // 用户密码
|
|
Role int `gorm:"column:role" json:"role"` // 用户角色
|
|
Email string `gorm:"column:email" json:"email"` // 用户邮箱
|
|
Phone string `gorm:"column:phone" json:"phone"` // 用户手机号码
|
|
Aptitude string `gorm:"column:aptitude" json:"aptitude"` // 用户资质证明(图片URL)
|
|
CreateTime time.Time `gorm:"column:create_time" json:"createTime"` // 用户注册时间
|
|
Approver int `gorm:"column:approver" json:"approver"` // 注册审核人ID
|
|
ModifyTime time.Time `gorm:"column:modify_time" json:"modifyTime"`
|
|
IsDelete int8 `gorm:"column:is_delete" json:"isDelete"` // 删除标志
|
|
}
|
|
|
|
type UserLogin struct {
|
|
Account string `json:"account"`
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
type UserRegister struct {
|
|
Username string `json:"username"`
|
|
Password string `json:"password"`
|
|
Email string `json:"email"`
|
|
Phone string `json:"phone"`
|
|
Aptitude string `json:"aptitude"`
|
|
}
|
|
|
|
type UserChangePwd struct {
|
|
Email string `json:"email"`
|
|
Code string `json:"code"`
|
|
NewPassword string `json:"newPassword"`
|
|
}
|
|
|
|
type UserApprove struct {
|
|
Email string `json:"email"`
|
|
Pass bool `json:"pass"`
|
|
}
|
|
|
|
func init() {
|
|
initJcMap[BackUser]()
|
|
}
|