models

package
v0.0.0-...-5037bb9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedTokens

type CachedTokens struct {
	AccessUID  string `json:"access"`
	RefreshUID string `json:"refresh"`
}

type Cart

type Cart struct {
	ID        int            `json:"id"`
	UserID    int32          `json:"user_id"`
	Products  []CartProducts `json:"products"`
	Deleted   string         `json:"deleted"`
	CreatedAt string         `json:"created_at"`
	UpdatedAt string         `json:"updated_at"`
}

type CartProductResponse

type CartProductResponse struct {
	ID       int            `json:"id"`
	UserID   int32          `json:"user_id"`
	Products []CartProducts `json:"products"`
}

type CartProducts

type CartProducts struct {
	CartID    int     `json:"cart_id"`
	ProductID int     `json:"product_id"`
	Quantity  int     `json:"quantity"`
	Price     float64 `json:"price"`
}

type CartResponse

type CartResponse struct {
	ID     int   `json:"id"`
	UserID int32 `json:"user_id"`
}

type LoginResponse

type LoginResponse struct {
	UserID       int32  `json:"user_id"`
	AccessToken  string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`
}

type Order

type Order struct {
	ID               int32           `json:"id"`
	UserID           int32           `json:"user_id"`
	Address          string          `json:"address"`
	Status           string          `json:"status"`
	PaymentMethod    string          `json:"payment_method"`
	PhoneNumber      string          `json:"phone_number"`
	CustomerName     string          `json:"customer_name"`
	CustomerLastname string          `json:"customer_lastname"`
	Products         []OrderProducts `json:"products"`
	Deleted          string          `json:"deleted"`
	CreatedAt        string          `json:"created_at"`
	UpdatedAt        string          `json:"updated_at"`
}

type OrderProducts

type OrderProducts struct {
	OrderID   int32   `json:"order_id"`
	ProductID int     `json:"product_id"`
	Quantity  int     `json:"quantity"`
	Price     float64 `json:"price"`
	Deleted   string  `json:"deleted"`
	CreatedAt string  `json:"created_at"`
	UpdatedAt string  `json:"updated_at"`
}

type OrderResponse

type OrderResponse struct {
	ID               int32           `json:"id"`
	UserID           int32           `json:"user_id"`
	Address          string          `json:"address"`
	PhoneNumber      string          `json:"phone_number"`
	CustomerName     string          `json:"customer_name"`
	CustomerLastname string          `json:"customer_lastname"`
	Status           string          `json:"status"`
	Products         []OrderProducts `json:"products"`
	CreatedAt        string          `json:"created_at"`
}

type Product

type Product struct {
	ID          int      `json:"id"`
	SupplierID  int32    `json:"supplier_id"`
	Name        string   `json:"name"`
	Price       float64  `json:"price"`
	Type        string   `json:"type"`
	Ingredients []string `json:"ingredients"`
	Image       string   `json:"image"`
	Deleted     string   `json:"deleted"`
	CreatedAt   string   `json:"created_at"`
	UpdatedAt   string   `json:"updated_at"`
}

type ProductResponse

type ProductResponse struct {
	ID          int      `json:"id"`
	SupplierID  int32    `json:"supplier_id"`
	Name        string   `json:"name"`
	Price       float64  `json:"price"`
	Type        string   `json:"type"`
	Ingredients []string `json:"ingredients"`
	Image       string   `json:"image"`
}

type ProductTypes

type ProductTypes string

type ProductsResponse

type ProductsResponse struct {
	Products []Product `json:"menu"`
}

type Supplier

type Supplier struct {
	ID        int32        `json:"id"`
	Name      string       `json:"name"`
	Type      string       `json:"type"`
	Menu      []Product    `json:"menu"`
	Image     string       `json:"image"`
	WorkHours WorkingHours `json:"workingHours"`
	Deleted   string       `json:"deleted"`
	CreatedAt string       `json:"created_at"`
	UpdatedAt string       `json:"updated_at"`
}

type SupplierResponse

type SupplierResponse struct {
	ID        int32        `json:"id"`
	Name      string       `json:"name"`
	Type      string       `json:"type"`
	Image     string       `json:"image"`
	WorkHours WorkingHours `json:"workingHours"`
	Deleted   string       `json:"deleted"`
}

type SupplierTypes

type SupplierTypes string

type SuppliersResponse

type SuppliersResponse struct {
	Suppliers []Supplier `json:"suppliers"`
}

type TokenResponse

type TokenResponse struct {
	RefreshToken string `json:"refresh_token"`
}

type User

type User struct {
	ID        int32  `json:"id"`
	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`
	Email     string `json:"email"`
	Password  string `json:"password"`
	Deleted   string `json:"deleted"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type UserResponse

type UserResponse struct {
	ID        int32  `json:"id"`
	FirstName string `json:"firstname"`
	LastName  string `json:"lastname"`
	Email     string `json:"email"`
}

type WorkingHours

type WorkingHours struct {
	Opening string `json:"opening"`
	Closing string `json:"closing"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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