Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEmailOrPasswordInvalid = errors.New("email or password invalid") ErrEmailExisted = errors.New("email has already existed") ErrCannotGetUser = errors.New("cannot get user info") ErrCannotGetUsers = errors.New("cannot get users info") ErrCannotCreateUser = errors.New("cannot create new user") )
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
core.SQLModel
Email string `json:"email" gorm:"column:email;"`
Password string `json:"-" gorm:"column:password;"`
Salt string `json:"-" gorm:"column:salt;"`
LastName string `json:"last_name" gorm:"column:last_name;"`
FirstName string `json:"first_name" gorm:"column:first_name;"`
Phone string `json:"phone" gorm:"column:phone;"`
Avatar *core.Image `json:"avatar" gorm:"column:avatar;"`
Role UserRole `json:"role" gorm:"column:role;"`
Status int `json:"status" gorm:"column:status;"`
}
type UserCreate ¶
type UserCreate struct {
core.SQLModel `json:",inline"`
FirstName string `json:"first_name" gorm:"column:first_name;"`
LastName string `json:"last_name" gorm:"column:last_name;"`
Email string `json:"email" gorm:"column:email;"`
Password string `json:"password" gorm:"column:password;"`
Role string `json:"-" gorm:"column:role;"`
Salt string `json:"-" gorm:"column:salt;"`
}
func (UserCreate) TableName ¶
func (UserCreate) TableName() string
type UserLogin ¶
Click to show internal directories.
Click to hide internal directories.