Added users support, made CRUD for users. Updated receipts feature

This commit is contained in:
2026-03-06 23:30:58 +03:00
parent 2ee1837fcc
commit a70527b388
32 changed files with 1667 additions and 123 deletions
+14
View File
@@ -0,0 +1,14 @@
CREATE TABLE families
(
id BIGSERIAL PRIMARY KEY,
name TEXT NOT NULL,
owner_id BIGINT NOT NULL REFERENCES users (id),
telegram_chat_id BIGINT NOT NULL,
telegram_chat_name TEXT,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_families_owner_id ON families (owner_id);
CREATE UNIQUE INDEX idx_families_chat_id ON families (telegram_chat_id);