17 lines
699 B
Go
17 lines
699 B
Go
package model
|
|
|
|
// SysUser represents a user in the database.
|
|
type SysUser struct {
|
|
BaseModel
|
|
Username string `gorm:"size:32;unique;not null;column:username;comment:'用户名'" json:"username"`
|
|
Password string `gorm:"size:64;not null;column:password;comment:'密码'" json:"password"`
|
|
Salt string `gorm:"size:16;not null;column:salt;comment:'盐'" json:"salt"`
|
|
IsSuper int `gorm:"type:TINYINT(1);default:0;column:is_super;comment:'是否是超级管理员-0:否,1:是'" json:"is_super"`
|
|
Remark string `gorm:"size:64;column:remark;comment:'备注'" json:"remark"`
|
|
}
|
|
|
|
// TableName sets the custom table name for the User model.
|
|
func (SysUser) TableName() string {
|
|
return "sys_user"
|
|
}
|