:new:初始化脚本以及一些工具类
This commit is contained in:
19
model/entity/user.go
Normal file
19
model/entity/user.go
Normal file
@@ -0,0 +1,19 @@
|
||||
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:'是否为管理员'"`
|
||||
}
|
||||
|
||||
func (*User) TableName() string {
|
||||
return "t_user"
|
||||
}
|
||||
Reference in New Issue
Block a user