Smail/server/models/User.go
Jinnrry 01cbdc9875
V2.5.0 (#132)
支持多用户
支持SSL证书支持DNS验证
增加mysql测试用例
修复DNS设置时的展示歧义
2024-07-02 21:02:00 +08:00

15 lines
641 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package models
type User struct {
ID int `xorm:"id unsigned int not null pk autoincr"`
Account string `xorm:"varchar(20) notnull unique comment('账号登陆名')"`
Name string `xorm:"varchar(10) notnull comment('用户名')"`
Password string `xorm:"char(32) notnull comment('登陆密码,两次md5加盐,md5(md5(password+pmail) +pmail2023)')" json:"-"`
Disabled int `xorm:"disabled unsigned int not null default(0) comment('0启用,1禁用')"`
IsAdmin int `xorm:"is_admin unsigned int not null default(0) comment('0不是管理员,1是管理员')"`
}
func (p User) TableName() string {
return "user"
}