models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PokemonModel

type PokemonModel struct {
	Id          string              `json:"id"`
	ReferenceId uint                `json:"reference_id"`
	TierId      uint                `json:"tier_id"`
	Name        string              `json:"name"`
	Weight      uint                `json:"weight"`
	Height      uint                `json:"height"`
	ImageUrl    string              `json:"image_url"`
	Experience  uint                `json:"experience"`
	CreatedAt   time.Time           `json:"created_at"`
	UpdatedAt   time.Time           `json:"updated_at"`
	DeletedAt   *time.Time          `json:"deleted_at,omitempty"`
	Tier        *TierModel          `json:"tiers"`
	Types       []PokemonTypesModel `json:"pokemon_types"`
	Prices      []PriceModel        `json:"prices"`
	Stock       *StockModel         `json:"stocks"`
}

type PokemonTypesModel

type PokemonTypesModel struct {
	PokemonId string        `json:"pokemon_id"`
	TypeId    string        `json:"type_id"`
	Pokemons  *PokemonModel `json:"pokemons"`
	Types     *TypeModel    `json:"types"`
}

type PriceModel

type PriceModel struct {
	PokemonId string     `json:"pokemon_id"`
	CreatedAt time.Time  `json:"created_at"`
	Value     uint       `json:"value"`
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	Pokemons  *PokemonModel
}

type StockModel

type StockModel struct {
	PokemonId string     `json:"pokemon_id"`
	Quantity  uint       `json:"quantity"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at,omitempty"`
	Pokemons  *PokemonModel
}

type TierModel

type TierModel struct {
	Id                uint       `json:"id"`
	Name              string     `json:"name"`
	MinimalExperience uint       `json:"minimal_experience"`
	LimitExperience   uint       `json:"limit_experience"`
	CreatedAt         time.Time  `json:"created_at"`
	UpdatedAt         time.Time  `json:"updated_at"`
	DeletedAt         *time.Time `json:"deleted_at,omitempty"`
}

type TypeModel

type TypeModel struct {
	Id          string     `json:"id"`
	ReferenceId uint       `json:"reference_id"`
	Name        string     `json:"name"`
	CreatedAt   time.Time  `json:"created_at"`
	UpdatedAt   time.Time  `json:"updated_at"`
	DeletedAt   *time.Time `json:"deleted_at,omitempty"`
}

type UserModel

type UserModel struct {
	Id        string            `json:"id"`
	Name      string            `json:"name"`
	Email     string            `json:"email"`
	Password  string            `json:"password"`
	Phone     string            `json:"phone"`
	BirthDate time.Time         `json:"birth_date"`
	Role      UserModelRoleEnum `json:"role"`
	CreatedAt time.Time         `json:"created_at"`
	UpdatedAt time.Time         `json:"updated_at"`
	DeletedAt time.Time         `json:"deleted_at"`
}

func NewUserModel

func NewUserModel(id string, name string, email string, phone string, birthDate time.Time, role UserModelRoleEnum,
	createdAt time.Time, updatedAt time.Time, deletedAt time.Time) *UserModel

type UserModelRoleEnum

type UserModelRoleEnum string
const (
	Client UserModelRoleEnum = "client"
	Admin  UserModelRoleEnum = "admin"
)

Jump to

Keyboard shortcuts

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