models

package
v0.0.0-...-45d79a7 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 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 Extra

type Extra struct {
	gorm.Model
	Name              string `json:"name"`
	MeasurementType   MeasurementType
	MeasurementTypeId uint    `json:"measurement_type_id"`
	Food              []*Food `gorm:"many2many:food_extra"`
}

type Food

type Food struct {
	gorm.Model
	Name   string   `json:"name"`
	Image  string   `json:"image"`
	Price  int      `json:"price"`
	Extras []*Extra `gorm:"many2many:food_extra;"`
}

type MeasurementType

type MeasurementType struct {
	gorm.Model
	Name string `json:"name"`
}

type Order

type Order struct {
	gorm.Model
	Name        string      `json:"name"`
	OrderType   uint        `json:"order_type"`
	OrderStatus uint        `json:"order_status"`
	OrderItems  []OrderItem `json:"order_items"`
}

type OrderItem

type OrderItem struct {
	gorm.Model
	OrderID         uint             `json:"order_id"`
	Amount          uint             `json:"food_amount"`
	FoodId          uint             `json:"food_id"`
	Food            Food             `json:"food"`
	OrderItemExtras []OrderItemExtra `json:"order_item_extras"`
}

type OrderItemExtra

type OrderItemExtra struct {
	gorm.Model
	Amount      uint `json:"extra_amount"`
	ExtraId     uint `json:"extra_id"`
	OrderItemId uint
	Extra       Extra
}

type User

type User struct {
	gorm.Model
	Email    string `json:"email"`
	Name     string `json:"name"`
	Password string `json:"password"`
}

Jump to

Keyboard shortcuts

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