online_code/models/entity/user_basic.go

20 lines
1.0 KiB
Go
Raw Normal View History

2022-05-25 17:30:46 +08:00
package entity
import "online_code/common/types"
2022-05-26 15:40:21 +08:00
type UserBasic struct {
2022-05-25 17:30:46 +08:00
types.BaseDbModel
Identity string `json:"identity" gorm:"column:identity;type:varchar(36);comment:'用户唯一标识'"`
Name string `json:"name" gorm:"column:name;type:varchar(100);not null;comment:'用户名'"`
Password string `json:"password" gorm:"column:password;type:varchar(32);not null;comment:'用户密码'"`
Phone string `json:"phone" gorm:"column:phone;type:varchar(20);not null;comment:'用户手机号'"`
Mail string `json:"mail" gorm:"column:mail;type:varchar(100);not null;comment:'用户邮箱'"`
PassNum int64 `json:"pass_num" gorm:"column:pass_num;type:int(11);comment:'通过的次数'"`
SubmitNum int64 `json:"submit_num" gorm:"column:submit_num;type:int(11);comment:'提交次数'"`
IsAdmin int `json:"is_admin" gorm:"column:is_admin;type:tinyint(1);comment:'是否是管理员【0-否1-是】'"`
}
2022-05-26 15:40:21 +08:00
func (table *UserBasic) TableName() string {
return "user_basic"
2022-05-25 17:30:46 +08:00
}