feat(adapters): WrapUpStatsQuery + WrapUpRepository for postgres/sqlite

This commit is contained in:
2026-06-02 22:04:46 +02:00
parent a95d831fd1
commit 5a6abdcc23
6 changed files with 933 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
CREATE TABLE IF NOT EXISTS wrap_up_records (
id TEXT PRIMARY KEY NOT NULL,
user_id TEXT,
start_date TEXT NOT NULL,
end_date TEXT NOT NULL,
status TEXT NOT NULL DEFAULT 'pending',
report_json TEXT,
error_message TEXT,
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%d %H:%M:%S', 'now')),
completed_at TEXT
);
CREATE INDEX IF NOT EXISTS idx_wrap_up_user ON wrap_up_records (user_id, start_date, end_date);