feat: add durable Kuknos settlement coordination

This commit is contained in:
Navid
2026-09-15 13:59:13 +03:30
parent d5c9b338a4
commit 12c478cf3a
34 changed files with 1846 additions and 122 deletions
@@ -0,0 +1,13 @@
CREATE TABLE kuknos_settlement_operator_audits (
id bigserial PRIMARY KEY,
settlement_id uuid NOT NULL REFERENCES kuknos_settlements(id),
actor_id text NOT NULL CHECK (actor_id <> ''),
action text NOT NULL CHECK (action IN ('RETRY')),
reason text NOT NULL CHECK (reason <> ''),
previous_status text NOT NULL,
resulting_status text NOT NULL,
created_at timestamptz NOT NULL DEFAULT clock_timestamp()
);
CREATE INDEX kuknos_settlement_operator_audits_settlement_idx
ON kuknos_settlement_operator_audits (settlement_id, created_at DESC);