model

package
v0.0.0-...-b143389 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewUserEntity

func NewUserEntity(user NewUser) entity.User

func NewUserType

func NewUserType(kind TypeUser) string

Types

type Animal

type Animal struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func NewAnimal

func NewAnimal(animal entity.Animal) *Animal

type Breed

type Breed struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func NewBreed

func NewBreed(breed entity.Breed) *Breed

type City

type City struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	StateID string `json:"stateId"`
}

func NewCity

func NewCity(city entity.City) *City

type NewUser

type NewUser struct {
	Name        string   `json:"name"`
	Email       string   `json:"email"`
	CityID      int      `json:"cityID"`
	StateID     int      `json:"stateID"`
	Phone       *string  `json:"phone"`
	Description *string  `json:"description"`
	Password    string   `json:"password"`
	Photo       *string  `json:"photo"`
	Type        TypeUser `json:"type"`
	ShowEmail   bool     `json:"showEmail"`
	ShowPhone   bool     `json:"showPhone"`
	ShowAddress bool     `json:"showAddress"`
	Address     string   `json:"address"`
	Number      *int     `json:"number"`
	ZipCode     string   `json:"zipCode"`
	Complement  *string  `json:"complement"`
	TotalPets   *int     `json:"totalPets"`
}

type State

type State struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Initials string `json:"initials"`
}

func NewState

func NewState(state entity.State) *State

type TypeUser

type TypeUser string
const (
	TypeUserNormal    TypeUser = "NORMAL"
	TypeUserModerator TypeUser = "MODERATOR"
)

func (TypeUser) IsValid

func (e TypeUser) IsValid() bool

func (TypeUser) MarshalGQL

func (e TypeUser) MarshalGQL(w io.Writer)

func (TypeUser) String

func (e TypeUser) String() string

func (*TypeUser) UnmarshalGQL

func (e *TypeUser) UnmarshalGQL(v interface{}) error

type User

type User struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Email       string   `json:"email"`
	CityID      int      `json:"cityID"`
	StateID     int      `json:"stateID"`
	Phone       *string  `json:"phone"`
	Description *string  `json:"description"`
	Password    string   `json:"password"`
	Photo       *string  `json:"photo"`
	Type        TypeUser `json:"type"`
	ShowEmail   bool     `json:"showEmail"`
	ShowPhone   bool     `json:"showPhone"`
	ShowAddress bool     `json:"showAddress"`
	Address     string   `json:"address"`
	Number      *int     `json:"number"`
	ZipCode     string   `json:"zipCode"`
	Complement  *string  `json:"complement"`
	TotalPets   *int     `json:"totalPets"`
}

func NewUserModel

func NewUserModel(user *entity.User) *User

Jump to

Keyboard shortcuts

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