Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUserIsNilPointer = errors.New("cannot create user by nil user pointer")
)
Functions ¶
func IsPhoneNumberUsed ¶
Types ¶
type User ¶
type User struct { basic.Model RealName string `json:"real_name"` PasswordHash []byte `json:"-"` PhoneNumber string `json:"phone_number" gorm:"uniqueIndex"` Age uint8 `json:"age"` // Gender 性别,0:女,1:男 Gender uint8 `json:"gender"` Address string `json:"address"` // AccountStatus 帐号状态,0:正常,1:注销 AccountStatus uint8 `json:"account_status"` RoleID *uint8 `json:"-"` Role *role.Role `json:"role"` }
func GetUserByID ¶
func GetUserByPhoneNumber ¶
func (*User) IsAllowedSignIn ¶
Click to show internal directories.
Click to hide internal directories.