online_code/models/entity/user_basic.go
2022-05-26 15:40:21 +08:00

20 lines
1.0 KiB
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 entity
import "online_code/common/types"
type UserBasic struct {
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-是】'"`
}
func (table *UserBasic) TableName() string {
return "user_basic"
}