wireguard-dashboard/model/entity/user.go
2024-03-07 15:11:29 +08:00

21 lines
904 B
Go
Raw Permalink 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 entity
import "wireguard-dashboard/constant"
// User
// @description: 用户信息
type User struct {
Base
Avatar string `json:"avatar" gorm:"type:varchar(255);not null;comment:'头像'"`
Name string `json:"name" gorm:"type:varchar(50);not null;comment:'用户名'"`
Account string `json:"account" gorm:"type:varchar(50);not null;comment:'账号'"`
Email string `json:"email" gorm:"type:varchar(255);default null;comment:'联系邮箱'"`
Password string `json:"password" gorm:"type:varchar(255);not null;comment:'密码'"`
IsAdmin constant.UserType `json:"isAdmin" gorm:"type:int(1);not null;comment:'是否为管理员'"`
Status constant.UserStatus `json:"status" gorm:"type:tinyint(1);not null;comment:'用户状态0 - 禁用 | 1 - 正常)'"`
}
func (*User) TableName() string {
return "t_user"
}