chore: perauset customer project

This commit is contained in:
e2e
2026-07-11 08:54:43 +02:00
commit 49d05dfa0b
293 changed files with 28421 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
-- Exchange rates table for daily currency conversion
CREATE TABLE app.exchange_rate (
rate_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
base_currency TEXT NOT NULL DEFAULT 'EGP',
target_currency TEXT NOT NULL,
rate NUMERIC(12,6) NOT NULL,
fetched_at DATE NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE UNIQUE INDEX idx_exchange_rate_unique ON app.exchange_rate(base_currency, target_currency, fetched_at);
CREATE INDEX idx_exchange_rate_date ON app.exchange_rate(fetched_at DESC);