Files
dbastrikin 6594013b53 refactor: introduce internal/domain/ layer, rename model.go → entity.go
Move all business-logic packages from internal/ root into internal/domain/:
  auth, cuisine, diary, dish, home, ingredient, language, menu, product,
  recipe, recognition, recommendation, savedrecipe, tag, units, user

Rename model.go → entity.go in packages that hold domain entities:
  diary, dish, home, ingredient, menu, product, recipe, savedrecipe, user

Update all import paths accordingly (adapters, infra/server, cmd/server,
tests). No logic changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 22:12:07 +02:00

40 lines
1.2 KiB
Go

package home
// Summary is the response for GET /home/summary.
type Summary struct {
Today TodaySummary `json:"today"`
ExpiringSoon []ExpiringSoon `json:"expiring_soon"`
Recommendations []Recommendation `json:"recommendations"`
}
// TodaySummary contains the day-level overview.
type TodaySummary struct {
Date string `json:"date"`
DailyGoal int `json:"daily_goal"`
LoggedCalories float64 `json:"logged_calories"`
Plan []MealPlan `json:"plan"`
}
// MealPlan is a single planned meal slot for today.
type MealPlan struct {
MealType string `json:"meal_type"`
RecipeTitle *string `json:"recipe_title"`
RecipeImageURL *string `json:"recipe_image_url"`
Calories *float64 `json:"calories"`
}
// ExpiringSoon is a product expiring within 3 days.
type ExpiringSoon struct {
Name string `json:"name"`
ExpiresInDays int `json:"expires_in_days"`
Quantity string `json:"quantity"`
}
// Recommendation is a saved recipe shown on the home screen.
type Recommendation struct {
ID string `json:"id"`
Title string `json:"title"`
ImageURL string `json:"image_url"`
Calories *float64 `json:"calories"`
}