Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct {
model.Base
Username string `json:"username"`
Email string `json:"email"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Password string `json:"-"` // Never expose password in JSON
OTP string `json:"-"` // Never expose OTP in JSON
IsActive bool `json:"is_active"`
IsVerified bool `json:"is_verified"`
DateJoined time.Time `json:"date_joined"`
LastLogin *time.Time `json:"last_login"` // Can be null
ProfileImageURL string `json:"profile_image_url,omitempty"`
}
func (*User) CheckPassword ¶
CheckPassword checks if the provided password matches the user's password
func (*User) GetFullName ¶
GetFullName returns the full name of the user
func (*User) SetPassword ¶
SetPassword sets the user's password (to be implemented with bcrypt)
Click to show internal directories.
Click to hide internal directories.