2025-06-20 17:13:51 +08:00
|
|
|
|
package model
|
|
|
|
|
|
|
2025-12-17 00:05:03 +08:00
|
|
|
|
import (
|
|
|
|
|
|
"blazing/cool"
|
|
|
|
|
|
)
|
2025-06-20 17:13:51 +08:00
|
|
|
|
|
|
|
|
|
|
const TableNameBaseSysUser = "base_sys_user"
|
|
|
|
|
|
|
|
|
|
|
|
// BaseSysUser mapped from table <base_sys_user>
|
|
|
|
|
|
type BaseSysUser struct {
|
|
|
|
|
|
*cool.Model
|
2025-08-31 07:32:25 +00:00
|
|
|
|
DepartmentID uint `gorm:"column:departmentId;type:bigint;index" json:"departmentId"` // 部门ID
|
2025-10-13 23:49:59 +08:00
|
|
|
|
|
2025-08-31 07:32:25 +00:00
|
|
|
|
Username string `gorm:"column:username;type:varchar(100);not null;Index" json:"username"` // 用户名
|
2025-12-31 16:20:01 +08:00
|
|
|
|
Password string `gorm:"column:password;type:varchar(255);" json:"password"` // 密码
|
2025-08-31 07:32:25 +00:00
|
|
|
|
PasswordV *int32 `gorm:"column:passwordV;type:int;not null;default:1" json:"passwordV"` // 密码版本, 作用是改完密码,让原来的token失效
|
2025-08-22 22:40:32 +08:00
|
|
|
|
|
|
|
|
|
|
HeadImg *string `gorm:"column:headImg;type:varchar(255)" json:"headImg"` // 头像
|
2025-10-13 23:49:59 +08:00
|
|
|
|
|
2025-12-06 23:59:00 +08:00
|
|
|
|
Email *string `gorm:"column:email;type:varchar(255)" json:"email"` // 邮箱
|
|
|
|
|
|
Status *int32 `gorm:"column:status;not null;default:1" json:"status"` // 状态 0:禁用 1:启用
|
2025-12-17 00:05:03 +08:00
|
|
|
|
GoldBean int64 `gorm:"column:goldbean;type:bigint;default:0" json:"goldbean"`
|
2026-03-11 12:19:13 +08:00
|
|
|
|
FreeGold int64 `gorm:"column:free_gold;type:bigint;default:0" json:"free_gold"` //集市金豆
|
|
|
|
|
|
Remark *string `gorm:"column:remark;type:varchar(255)" json:"remark"` // 备注
|
2026-02-13 06:02:32 +08:00
|
|
|
|
//Debug int32 `gorm:"column:debug;type:int;not null;default:0" json:"debug"` // 是否可以进入2服 测试服
|
|
|
|
|
|
Maxts uint32 `gorm:"column:max_ts;type:int;not null;default:0" json:"max_ts"` //最后生成的时间记录表
|
2025-06-20 17:13:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TableName BaseSysUser's table name
|
|
|
|
|
|
func (*BaseSysUser) TableName() string {
|
|
|
|
|
|
return TableNameBaseSysUser
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// NewBaseSysUser 创建一个新的BaseSysUser
|
|
|
|
|
|
func NewBaseSysUser() *BaseSysUser {
|
|
|
|
|
|
return &BaseSysUser{
|
|
|
|
|
|
Model: cool.NewModel(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// init 创建表
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
cool.CreateTable(&BaseSysUser{})
|
|
|
|
|
|
}
|