Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID int32 `pg:"id" json:"id"` Email string `pg:"email" json:"email" binding:"required"` Password string `pg:"password" json:"-"` Number string `pg:"number" json:"number" binding:"required" validate:"min=8,max=12"` Name string `pg:"name" json:"name"` LoginTime time.Time `pg:"login_at" json:"-"` LoginIP net.IP `pg:"login_ip" json:"-"` LoginCount int64 `pg:"login_count" json:"-"` Status int `pg:"status" json:"status"` Role int `pg:"role" json:"role,omitempty"` CreatedAt time.Time `pg:"created_at" json:"createdAt,omitempty"` UpdatedAt time.Time `pg:"updated_at" json:"updatedAt,omitempty"` DeletedAt time.Time `pg:"deleted_at" json:"-"` }
func (*User) ComparePassword ¶
func (*User) HashedPassword ¶
func (*User) ValidateEmail ¶
func (*User) ValidatePassword ¶
Passwords must contain at least eight characters, including at least 1 letter and 1 number.
Click to show internal directories.
Click to hide internal directories.