forked from mtusi2026/mtusi2026lab3
ЛР 3: реализация мессенджера и сценарии проверки
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE message_requests (
|
||||
user_id uuid NOT NULL,
|
||||
chat_id uuid NOT NULL,
|
||||
request_key text NOT NULL,
|
||||
fingerprint bytea NOT NULL,
|
||||
expires_at timestamptz NOT NULL DEFAULT (clock_timestamp() + interval '24 hours'),
|
||||
message_id uuid REFERENCES messages(id),
|
||||
PRIMARY KEY (user_id, chat_id, request_key),
|
||||
FOREIGN KEY (chat_id, user_id) REFERENCES chat_members(chat_id, user_id)
|
||||
);
|
||||
Reference in New Issue
Block a user