chore: perauset customer project

This commit is contained in:
e2e
2026-07-11 08:35:02 +02:00
commit 1b5783d507
293 changed files with 28412 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE app.inventory_transaction (
transaction_id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
item_id UUID NOT NULL REFERENCES app.inventory_item(item_id),
quantity_change NUMERIC NOT NULL,
reason TEXT NOT NULL, -- 'stocktake', 'adjustment', 'consumption', 'restock', 'request_fulfilled'
notes TEXT,
created_by_user_id UUID NOT NULL REFERENCES app."user"(user_id),
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX idx_inventory_transaction_item ON app.inventory_transaction(item_id);
CREATE INDEX idx_inventory_transaction_created ON app.inventory_transaction(created_at);