domain

package
v0.0.0-...-30a6304 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	Id       int    `json:"id" db:"id"`
	Name     string `json:"name" db:"name"`
	Password string `json:"password" db:"password_hash"`
}

type Category

type Category struct {
	Id           int    `json:"id" db:"id"`
	RestaurantId int    `json:"restaurant_id" db:"restaurant_id"`
	Title        string `json:"title" db:"title"`
}

type Courier

type Courier struct {
	Id            int       `json:"id" db:"id"`
	Name          string    `json:"name" db:"name"`
	Phone         string    `json:"phone" db:"phone"`
	Password      string    `json:"password" db:"password_hash"`
	Email         string    `json:"email" db:"email"`
	Address       *Location `json:"location" db:"location"`
	WorkingStatus int       `json:"working_status" db:"working_status"`
}

type Location

type Location struct {
	Latitude  float64 `json:"latitude" db:"latitude"`
	Longitude float64 `json:"longitude" db:"longitude"`
}
type MenuItem struct {
	Id           int    `json:"id" db:"id"`
	RestaurantId int    `json:"restaurant_id" db:"restaurant_id"`
	Title        string `json:"title" db:"title"`
	Image        string `json:"image" db:"image"`
	Description  string `json:"description" db:"description"`
	Price        int    `json:"price" db:"price"`
}

type Order

type Order struct {
	Id            int        `json:"id" db:"id"`
	UserId        int        `json:"user_id" db:"user_id"`
	RestaurantId  int        `json:"restaurant_id" db:"restaurant_id"`
	CourierId     int        `json:"courier_id" db:"courier_id"`
	DeliveryPrice int        `json:"delivery_price" db:"delivery_price"`
	TotalPrice    int        `json:"total_price" db:"total_price"`
	Status        int        `json:"status" db:"status"`
	Paid          *time.Time `json:"paid" db:"paid"`
}

type OrderItem

type OrderItem struct {
	Id         int `json:"id" db:"id"`
	OrderId    int `json:"order_id" db:"order_id"`
	MenuItemId int `json:"menu_item_id" db:"menu_item_id"`
	Count      int `json:"count" db:"count"`
}

type Restaurant

type Restaurant struct {
	Id            int       `json:"id" db:"id"`
	Name          string    `json:"name" db:"name"`
	Phone         string    `json:"phone" db:"phone"`
	Password      string    `json:"password" db:"password_hash"`
	WorkingStatus int       `json:"working_status" db:"working_status"`
	Address       *Location `json:"location" db:"location"`
	Image         string    `json:"image" db:"image"`
}

type User

type User struct {
	Id       int       `json:"id" db:"id"`
	Name     string    `json:"name" db:"name"`
	Phone    string    `json:"phone" db:"phone"`
	Password string    `json:"password" db:"password_hash"`
	Email    string    `json:"email" db:"email"`
	Address  *Location `json:"location" db:"location"`
}

Jump to

Keyboard shortcuts

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