added filter and tag for ingredients
This commit is contained in:
@@ -24,6 +24,20 @@ type Ingredient struct {
|
||||
UserID int `json:"user_id"`
|
||||
Name string `json:"name"`
|
||||
Unit string `json:"unit"` // e.g., "grams", "ml", "cups", "pieces", "tbsp"
|
||||
Tags []Tag `json:"tags,omitempty"`
|
||||
}
|
||||
|
||||
// Tag represents a tag for categorizing ingredients
|
||||
type Tag struct {
|
||||
ID int `json:"id"`
|
||||
UserID int `json:"user_id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// IngredientTag represents the many-to-many relationship between ingredients and tags
|
||||
type IngredientTag struct {
|
||||
IngredientID int `json:"ingredient_id"`
|
||||
TagID int `json:"tag_id"`
|
||||
}
|
||||
|
||||
// Meal represents a meal recipe
|
||||
|
||||
Reference in New Issue
Block a user