рестеу бвт2302 лаба5

This commit is contained in:
Otto
2026-11-17 03:47:52 +03:00
parent 276dbdad8a
commit 8c36a874ce
26 changed files with 1680 additions and 48 deletions
+11
View File
@@ -0,0 +1,11 @@
CREATE TABLE message_requests (
sender_id UUID NOT NULL REFERENCES users(id),
chat_id UUID NOT NULL REFERENCES chats(id),
request_key VARCHAR(128) NOT NULL,
request_hash CHAR(64) NOT NULL,
message_id UUID REFERENCES messages(id),
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
PRIMARY KEY (sender_id, chat_id, request_key)
);
CREATE INDEX message_requests_created_idx ON message_requests (created_at);