model

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 2 Imported by: 0

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

func (u *User) CheckPassword(password string) bool

CheckPassword checks if the provided password matches the user's password

func (*User) GetFullName

func (u *User) GetFullName() string

GetFullName returns the full name of the user

func (*User) SetPassword

func (u *User) SetPassword(password string)

SetPassword sets the user's password (to be implemented with bcrypt)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL