CREATE TABLE FriendRequests (
request_id AUTOINCREMENT PRIMARY KEY,
sender_id LONG NOT NULL,
receiver_id LONG NOT NULL,
request_date DATETIME,
status TEXT(20) NOT NULL
);
CREATE TABLE Posts (
post_id AUTOINCREMENT PRIMARY KEY,
author_id LONG NOT NULL,
created_at DATETIME,
[text] LONGTEXT,
visibility TEXT(20) NOT NULL
);
CREATE TABLE Attachments (
attachment_id AUTOINCREMENT PRIMARY KEY,
post_id LONG NOT NULL,
attachment_type TEXT(20) NOT NULL,
file_path TEXT(255)
);
CREATE TABLE Comments (
comment_id AUTOINCREMENT PRIMARY KEY,
post_id LONG NOT NULL,
author_id LONG NOT NULL,
[text] LONGTEXT,
created_at DATETIME
);
CREATE TABLE Likes (
like_id AUTOINCREMENT PRIMARY KEY,
user_id LONG NOT NULL,
post_id LONG,
comment_id LONG,
created_at DATETIME
);
CREATE TABLE Messages (
message_id AUTOINCREMENT PRIMARY KEY,
sender_id LONG NOT NULL,
receiver_id LONG NOT NULL,
[text] LONGTEXT,
sent_at DATETIME,
status TEXT(20) NOT NULL
);
CREATE TABLE Complaints (
complaint_id AUTOINCREMENT PRIMARY KEY,
author_id LONG NOT NULL,
post_id LONG,
comment_id LONG,
reason LONGTEXT,
status TEXT(30) NOT NULL
);