ЛР 3 — БПИ2304 — Кирюпина — на 3

This commit is contained in:
SashaKirupina
2026-11-12 18:27:32 +03:00
parent 0ab3a341aa
commit 4b8abdf073
36 changed files with 1782 additions and 28 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE message_requests (
user_id uuid NOT NULL REFERENCES users(id),
chat_id uuid NOT NULL REFERENCES chats(id),
key text NOT NULL,
text text NOT NULL,
message_id uuid NOT NULL REFERENCES messages(id),
response jsonb NOT NULL,
expires_at timestamptz NOT NULL,
PRIMARY KEY (user_id, chat_id, key)
);
CREATE INDEX message_requests_expiry ON message_requests(expires_at);