Implemented KYB, compliance decisions, integration, and testing
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- A new missing record is not evidence of collection. Historical rows/snapshots remain intact.
|
||||
INSERT INTO "KybChecklistItem" ("id", "merchantId", "documentCode", "state", "updatedAt")
|
||||
SELECT gen_random_uuid()::text, "id", 'AUTHORIZED_REPRESENTATIVE', 'MISSING', CURRENT_TIMESTAMP
|
||||
FROM "Merchant" WHERE "status" NOT IN ('LIVE', 'REJECTED')
|
||||
ON CONFLICT ("merchantId", "documentCode") DO NOTHING;
|
||||
-- Invalidate any editor opened against the old policy; preserve company/stage timestamps.
|
||||
UPDATE "Merchant" SET "version" = "version" + 1 WHERE "status" NOT IN ('LIVE', 'REJECTED');
|
||||
Reference in New Issue
Block a user