feat(logs): persist business events

This commit is contained in:
2026-08-19 21:03:56 +08:00
parent 62c811fea2
commit 4474069a29
19 changed files with 623 additions and 32 deletions
+9
View File
@@ -230,6 +230,15 @@ CREATE TABLE IF NOT EXISTS billing_ledger (
);
CREATE INDEX IF NOT EXISTS idx_billing_ledger_key
ON billing_ledger(managed_key_id, id DESC);
CREATE TABLE IF NOT EXISTS business_events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
occurred_at TEXT NOT NULL,
event TEXT NOT NULL,
status TEXT NOT NULL
);
CREATE INDEX IF NOT EXISTS idx_business_events_time
ON business_events(occurred_at DESC, id DESC);
`
const (