Documentation ¶
Index ¶
Constants ¶
View Source
const ( UserRoleAdmin = "admin" UserRoleManager = "manager" UserRoleNormal = "normal" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { gorm.Model UserId int64 `gorm:"uniqueIndex"` //下面三种信息在库中都是不可重复的 UserName string `gorm:"uniqueIndex;size:255"` Email *string `gorm:"uniqueIndex;size:255"` Phone *string `gorm:"uniqueIndex;size:255"` Password string Roles string }
func (*User) GenerateId ¶
func (u *User) GenerateId()
Click to show internal directories.
Click to hide internal directories.