Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkModel ¶
type LinkModel struct { ID uint `gorm:"column:id;primary_key"` Name *string `gorm:"column:name"` RealUrl string `gorm:"column:real_url;unique"` GeneratedAlias string `gorm:"column:generated_alias;unique"` CreatedAt *time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP"` UserID uint `gorm:"column:user_id"` }
type UserModel ¶
type UserModel struct { ID uint `gorm:"column:id;primary_key"` Email string `gorm:"column:email;unique_index"` PasswordHash string `gorm:"column:password;not null"` Role string `gorm:"column:role;default:user"` RegisteredAt *time.Time `gorm:"column:registered_at;not null;default:CURRENT_TIMESTAMP"` Links []LinkModel `gorm:"foreignKey:user_id;references:id"` }
func FindOneUser ¶
func FindOneUser(condition any) (UserModel, *utils.CommonError)
func (*UserModel) ComparePassword ¶
func (*UserModel) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.