entities

package
v0.0.0-...-a2883fb Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserLangEN = "en"
	UserLangID = "id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	ID        common.ID
	UserId    string
	Email     string
	Password  string
	CreatedAt time.Time
	UpdatedAt time.Time
}

type User

type User struct {
	ID              common.ID
	Name            string
	Email           string
	Avatar          string
	LangCode        string
	EmailVerifiedAt time.Time
	CreatedAt       time.Time
	UpdatedAt       time.Time
}

func NewUser

func NewUser(x UserDto, finds ...*User) *User

func (*User) DefaultLang

func (x *User) DefaultLang()

default language english (en)

func (*User) SetEmailVerifiedAt

func (x *User) SetEmailVerifiedAt(val time.Time)

default language english (en)

func (*User) Validate

func (x *User) Validate() (err *multierror.Error)

type UserDto

type UserDto struct {
	ID              *common.ID
	Name            string
	Email           string
	Avatar          string
	LangCode        string
	EmailVerifiedAt time.Time
	Auth            Auth
}

type UserMeta

type UserMeta struct {
	Data  []*User
	Total int
}

type UserQueryParams

type UserQueryParams struct {
	Search  string
	Page    int
	PerPage int
}

Jump to

Keyboard shortcuts

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