wireguard-dashboard/model/user.go

19 lines
924 B
Go
Raw Permalink Normal View History

2024-07-05 14:41:35 +08:00
package model
import "wireguard-ui/global/constant"
type User struct {
Base
Account string `json:"account" gorm:"type:varchar(50);not null;index:idx_account;comment: '登陆账号'"`
Password string `json:"password" gorm:"type:varchar(255);not null;comment: '密码'"`
Nickname string `json:"nickname" gorm:"type:varchar(50);not null;comment: '昵称'"`
Avatar string `json:"avatar" gorm:"type:varchar(255);not null;comment: '头像'"`
Contact string `json:"contact" gorm:"type:varchar(255);default null;comment: '联系方式(邮箱|电话)'"`
IsAdmin constant.UserType `json:"isAdmin" gorm:"type:tinyint(1);not null;comment: '是否为管理员0 - 否 | 1 - 是)'"`
Status constant.Status `json:"status" gorm:"type:tinyint(1);not null;comment: '用户状态0 - 否 | 1 - 是)'"`
}
func (User) TableName() string {
return "t_user"
}