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

This commit is contained in:
SashaKirupina
2026-11-13 12:59:02 +03:00
parent ec540a1a72
commit 4c1109c93d
39 changed files with 3361 additions and 36 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);