user

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromStatus

func FromStatus(s Status) int

Types

type Status

type Status int //nolint:recvcheck
const (
	Active  Status = 1
	Delete  Status = 2
	Pending Status = 3
)

func FromInt

func FromInt(value int) (Status, error)

func (*Status) Scan

func (s *Status) Scan(value interface{}) error

func (*Status) String

func (s *Status) String() string

func (Status) Val

func (s Status) Val() int

func (Status) Value

func (s Status) Value() (driver.Value, error)

type User

type User struct {
	ID          int64               `json:"id" jsonapi:"primary,user"`
	FirstName   string              `json:"firstName" jsonapi:"attr,firstName"`
	SecondName  string              `json:"secondName" jsonapi:"attr,secondName"`
	Email       string              `json:"email" jsonapi:"attr,email"`
	PhoneNumber string              `json:"phoneNumber" jsonapi:"attr,phoneNumber"`
	Password    string              `json:"password"`
	Status      Status              `json:"status" jsonapi:"attr,status"`
	Hash        dbtype.NilString    `json:"hash" jsonapi:"attr,hash"`
	Roles       roles.Roles         `json:"roles" jsonapi:"attr,roles"`
	ConfirmedAt dbtype.NilTime      `json:"confirmed_at" jsonapi:"attr,confirmedAt"`
	CreatedAt   timestamp.Timestamp `json:"created_at" jsonapi:"attr,createdAt"`
	UpdatedAt   timestamp.Timestamp `json:"updated_at" jsonapi:"attr,updatedAt"`
}

func (*User) Sanitize

func (us *User) Sanitize()

Jump to

Keyboard shortcuts

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