Restructure food suggestion data and builder logic

This commit is contained in:
2026-04-13 17:55:11 +02:00
parent 6c7c1f01c9
commit 305440a6b2
5 changed files with 820 additions and 67 deletions
+7
View File
@@ -52,6 +52,7 @@ CREATE TABLE IF NOT EXISTS user_settings (
notification_channel TEXT NOT NULL DEFAULT 'in_app',
suggestion_style TEXT NOT NULL DEFAULT 'balanced',
energy_preference TEXT NOT NULL DEFAULT 'neutral',
protein_preference TEXT NOT NULL DEFAULT 'mixed',
remind_before_shopping INTEGER NOT NULL DEFAULT 1,
remind_on_shopping_day INTEGER NOT NULL DEFAULT 1,
show_missing_for_upcoming_week INTEGER NOT NULL DEFAULT 1,
@@ -120,6 +121,12 @@ CREATE TABLE IF NOT EXISTS items (
kind TEXT NOT NULL CHECK (kind IN ('food', 'meal')),
name TEXT NOT NULL,
category TEXT,
base_type TEXT NOT NULL DEFAULT 'neutral',
suggestion_role TEXT NOT NULL DEFAULT 'base',
suggestion_priority TEXT NOT NULL DEFAULT 'normal',
can_be_meal_core INTEGER NOT NULL DEFAULT 0,
meal_type TEXT,
meal_tags TEXT NOT NULL DEFAULT '',
energy_density TEXT NOT NULL DEFAULT 'neutral',
note TEXT,
photo_filename TEXT,