Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassicalName ¶
type Ingredient ¶
type Pizza ¶
type Pizza struct {
ID int64 `bun:",pk,autoincrement"`
CreatedAt time.Time `json:"-" bun:",nullzero,notnull,default:current_timestamp"`
Name string `json:"name"`
DoughID int64 `json:"-"`
Dough Dough `json:"dough" bun:"rel:belongs-to,join:dough_id=id"`
Ingredients []Ingredient `json:"ingredients" bun:"m2m:pizza_to_ingredients,join:Pizza=Ingredient"`
Tool string `json:"tool"`
}
func (Pizza) CalculateCalories ¶
func (Pizza) IsVegetarian ¶
type PizzaToIngredients ¶
type PizzaToIngredients struct {
PizzaID int64 `bun:",pk"`
Pizza *Pizza `bun:"rel:belongs-to,join:pizza_id=id"`
IngredientID int64 `bun:",pk"`
Ingredient *Ingredient `bun:"rel:belongs-to,join:ingredient_id=id"`
}
Click to show internal directories.
Click to hide internal directories.