model

package
v0.0.0-...-1969f72 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type AuthData

type AuthData struct {
	Token string `json:"Token"`
}

type Gender

type Gender string
const (
	GenderMale   Gender = "Male"
	GenderFamele Gender = "Famele"
	GenderNone   Gender = "None"
)

func (Gender) IsValid

func (e Gender) IsValid() bool

func (Gender) MarshalGQL

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

func (Gender) String

func (e Gender) String() string

func (*Gender) UnmarshalGQL

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

type IdentificationType

type IdentificationType string
const (
	IdentificationTypeV IdentificationType = "V"
	IdentificationTypeE IdentificationType = "E"
	IdentificationTypeP IdentificationType = "P"
	IdentificationTypeJ IdentificationType = "J"
)

func (IdentificationType) IsValid

func (e IdentificationType) IsValid() bool

func (IdentificationType) MarshalGQL

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

func (IdentificationType) String

func (e IdentificationType) String() string

func (*IdentificationType) UnmarshalGQL

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

type Message

type Message struct {
	ID      string `json:"id"`
	User    string `json:"user"`
	Content string `json:"content"`
}

type Role

type Role string
const (
	RoleOwner    Role = "Owner"
	RolePayer    Role = "Payer"
	RoleOperator Role = "Operator"
	RoleDriver   Role = "Driver"
)

func (Role) IsValid

func (e Role) IsValid() bool

func (Role) MarshalGQL

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

func (Role) String

func (e Role) String() string

func (*Role) UnmarshalGQL

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

type User

type User struct {
	ID                   int                `json:"id"`
	FullName             string             `json:"full_name"`
	Email                string             `json:"email"`
	Role                 Role               `json:"role"`
	Gender               Gender             `json:"gender"`
	IdentificationType   IdentificationType `json:"identification_type"`
	IdentificationNumber string             `json:"identification_number"`
	CountryCode          string             `json:"country_code"`
	PhoneNumber          string             `json:"phone_number"`
	Ocupation            string             `json:"ocupation"`
	Weight               *float64           `json:"weight,omitempty"`
	Height               *float64           `json:"height,omitempty"`
	Birthday             *time.Time         `json:"birthday,omitempty"`
	ProfileImgURL        *string            `json:"profile_img_url,omitempty"`
	CreatedAt            time.Time          `json:"created_at"`
	UpdatedAt            time.Time          `json:"updated_at"`
	DeletedAt            *time.Time         `json:"deleted_at,omitempty"`
}

The `User` type defines the queryable fields for every user in our data source.

type UserInput

type UserInput struct {
	FullName             string             `json:"full_name"`
	Email                string             `json:"email"`
	Password             string             `json:"password"`
	Gender               Gender             `json:"gender"`
	IdentificationType   IdentificationType `json:"identification_type"`
	IdentificationNumber string             `json:"identification_number"`
	CountryCode          string             `json:"country_code"`
	PhoneNumber          string             `json:"phone_number"`
	Ocupation            string             `json:"ocupation"`
	Weight               *float64           `json:"weight,omitempty"`
	Height               *float64           `json:"height,omitempty"`
	Birthday             *time.Time         `json:"birthday,omitempty"`
	ProfileImg           *graphql.Upload    `json:"profile_img,omitempty"`
}

The `UserInput` input type is used to create and update users.

Jump to

Keyboard shortcuts

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