package recipe import "time" // Recipe is a cooking variant of a Dish in the catalog. // It links to a Dish for all presentational data (name, image, cuisine, tags). type Recipe struct { ID string `json:"id"` DishID string `json:"dish_id"` Source string `json:"source"` // ai | user | spoonacular Difficulty *string `json:"difficulty"` PrepTimeMin *int `json:"prep_time_min"` CookTimeMin *int `json:"cook_time_min"` Servings *int `json:"servings"` CaloriesPerServing *float64 `json:"calories_per_serving"` ProteinPerServing *float64 `json:"protein_per_serving"` FatPerServing *float64 `json:"fat_per_serving"` CarbsPerServing *float64 `json:"carbs_per_serving"` FiberPerServing *float64 `json:"fiber_per_serving"` Ingredients []RecipeIngredient `json:"ingredients"` Steps []RecipeStep `json:"steps"` Notes *string `json:"notes,omitempty"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` } // RecipeIngredient is a single ingredient row from recipe_ingredients. type RecipeIngredient struct { ID string `json:"id"` IngredientID *string `json:"ingredient_id"` Name string `json:"name"` Amount float64 `json:"amount"` UnitCode *string `json:"unit_code"` IsOptional bool `json:"is_optional"` SortOrder int `json:"sort_order"` } // RecipeStep is a single step row from recipe_steps. type RecipeStep struct { ID string `json:"id"` StepNumber int `json:"step_number"` Description string `json:"description"` TimerSeconds *int `json:"timer_seconds"` ImageURL *string `json:"image_url"` }