models

package
v0.0.0-...-9aa584b Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountRole

type AccountRole string
const (
	UserRole  AccountRole = "user"
	AdminRole AccountRole = "admin"
)

type AccountStatus

type AccountStatus string
const (
	ActiveAccount    AccountStatus = "Active"
	SuspendedAccount AccountStatus = "Suspended"
	InactiveAccount  AccountStatus = "Inactive"
)

type User

type User struct {
	Email         string      `json:"email"`
	Password      string      `json:"password,omitempty"`
	LastLogin     string      `json:"last_login"`
	IP            string      `json:"ip"`
	ID            uuid.UUID   `json:"id" validate:"required"`
	Role          AccountRole `json:"role" validate:"required"`
	EmailVerified bool        `json:"email_verified" validate:"required"`
	Country       string      `json:"country"`
	PhoneNumber   string      `json:"phone_number"`
	FirstName     string      `json:"first_name" validate:"required"`
	LastName      string      `json:"last_name" validate:"required"`
	Status        string      `json:"status"`
	CreatedAt     time.Time   `json:"created_at"`
	UpdatedAt     time.Time   `json:"updated_at"`
}

func (*User) MarshalJSON

func (u *User) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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