Documentation ¶
Index ¶
Constants ¶
View Source
const ( UserStatusActive = "active" UserStatusInactive = "inactive" UserStatusBanned = "banned" MinPasswordLength = 8 MaxPasswordLength = 72 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID primitive.ObjectID `json:"id" bson:"_id,omitempty"` Name string `json:"name" bson:"name"` Email string `json:"email" bson:"email"` Password string `json:"password,omitempty" bson:"password"` Role Role `json:"role" bson:"role"` Status string `json:"status" bson:"status"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
func (*User) BeforeCreate ¶
func (*User) BeforeUpdate ¶
func (*User) ComparePassword ¶
func (*User) HashPassword ¶
func (*User) ValidateUpdate ¶
Click to show internal directories.
Click to hide internal directories.