feat(base): 更新用户模型字段定义

移除已注释的字段定义,包括 Name、Phone 和 Role 相关字段。
调整字段顺序并保留有效字段:Username、Password、PasswordV、HeadImg、Email、Status、Remark。
This commit is contained in:
2025-10-13 23:49:59 +08:00
parent eff23d5bd0
commit 14b7b03cef
2 changed files with 5 additions and 6 deletions

View File

@@ -8,18 +8,17 @@ const TableNameBaseSysUser = "base_sys_user"
type BaseSysUser struct {
*cool.Model
DepartmentID uint `gorm:"column:departmentId;type:bigint;index" json:"departmentId"` // 部门ID
//Name *string `gorm:"column:name;type:varchar(255)" json:"name"` // 姓名
Username string `gorm:"column:username;type:varchar(100);not null;Index" json:"username"` // 用户名
Password string `gorm:"column:password;type:varchar(255);not null" json:"password"` // 密码
PasswordV *int32 `gorm:"column:passwordV;type:int;not null;default:1" json:"passwordV"` // 密码版本, 作用是改完密码让原来的token失效
HeadImg *string `gorm:"column:headImg;type:varchar(255)" json:"headImg"` // 头像
//Phone *string `gorm:"column:phone;type:varchar(20);index" json:"phone"` // 手机
Email *string `gorm:"column:email;type:varchar(255)" json:"email"` // 邮箱
Status *int32 `gorm:"column:status;not null;default:1" json:"status"` // 状态 0:禁用 1启用
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
//Role bool `gorm:"column:isNew;type:bool;not null;default:0" json:"isNew"` //
//SocketID *string `gorm:"column:socketId;type:varchar(255)" json:"socketId"` // socketId
}
// TableName BaseSysUser's table name

View File

@@ -238,8 +238,8 @@ func NewBaseSysUserService() *BaseSysUserService {
Model: model.NewBaseSysUser(),
InfoIgnoreProperty: "password",
UniqueKey: map[string]string{
// "username": "用户名不能重复",
"email": "邮箱不能重复",
"username": "用户名不能重复",
"email": "邮箱不能重复",
},
PageQueryOp: &cool.QueryOp{
Select: `