feat: FDDB-Listen auflösen und Katalog nach Name suchen
Tagebuchzeilen eigener Rezepte werden über den Listen-Import in Zutaten zerlegt. Zuordnen erfolgt im Namens-Popup statt per BLS-Code. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
4b1be3019d
commit
86f15e6957
17 files changed
+866
-86
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# BLS Food Reference – technische Spec
|
||||
|
||||
**Stand:** 2026-09-12 · Migration **062**
|
||||
**Stand:** 2026-09-12 · Migration **062** + **063**
|
||||
|
||||
## Tabellen
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
- `nutrition_items` — Tagebuchzeilen inkl. `logged_at`
|
||||
- `nutrition_daily_nutrients` — Tages-Rollup numerischer Attribute
|
||||
- `nutrition_day_marks` — `fasting` | `incomplete`
|
||||
- `food_recipes` / `food_recipe_ingredients` — FDDB-Listen; `nutrition_items.recipe_id`
|
||||
|
||||
## Layer 1
|
||||
|
||||
- `data_layer/food_mapping.py` — Normalisierung, Lookup, Learn, Apply, Delete
|
||||
- `data_layer/nutrition_items.py` — Ingest, drei Makro-Summen, Policy, `resolve_*_attributes`
|
||||
- `data_layer/food_recipes.py` — Listen-Upsert, Link auf Tagebuchzeilen, Rezept-Makros (Skala: gegessen_g / Summe Zutaten, sonst 1/Portionen)
|
||||
- `bls/recipe_parser.py` — `produkte`-Feld: Split nur vor nächstem `\d+ (g|kg|ml|l)` (Kommas im Namen bleiben)
|
||||
|
||||
## Import
|
||||
|
||||
@@ -29,3 +32,6 @@ FDDB: Items persistieren; `nutrition_log` nur bei leerem Tag oder laut Policy /
|
||||
- `/api/admin/bls/*` — Import, Katalog, Attribute
|
||||
- `/api/admin/food-mappings` — Admin-CRUD
|
||||
- `/api/nutrition/*` — Items, Unmapped, Bulk-Map, Marken, Konflikt-Resolve
|
||||
- `GET /api/nutrition/recipes`, `POST /api/nutrition/recipes/import-fddb-lists`, `POST /api/nutrition/recipes/{id}/apply`
|
||||
- Unmapped = Tagebuchzeilen ohne `food_id`/`recipe_id` **plus** Rezeptzutaten ohne Mapping
|
||||
- Frontend: `FoodSearchModal` (Name-Suche), Listen-Import auf dem Tab Zuordnen
|
||||
Reference in new issue
Block a user