docs(report): fill REPORT.md for lab4 grade 3

This commit is contained in:
2026-11-11 18:42:30 +03:00
parent ec540a1a72
commit 451482e1cb
72 changed files with 2894 additions and 22 deletions
@@ -0,0 +1,20 @@
CREATE TABLE attachments (
id UUID PRIMARY KEY,
chat_id UUID NOT NULL REFERENCES chats(id) ON DELETE CASCADE,
owner_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
filename VARCHAR(255) NOT NULL,
content_type VARCHAR(100) NOT NULL,
size_bytes BIGINT NOT NULL,
sha256 VARCHAR(64) NOT NULL,
object_key VARCHAR(255) NOT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL
);
CREATE INDEX idx_attachments_chat_id ON attachments (chat_id);
-- Связь сообщений с вложениями (Many-to-Many)
CREATE TABLE message_attachments (
message_id UUID NOT NULL REFERENCES messages(id) ON DELETE CASCADE,
attachment_id UUID NOT NULL REFERENCES attachments(id) ON DELETE CASCADE,
PRIMARY KEY (message_id, attachment_id)
);