changed stuff according to merge request !2

This commit is contained in:
Anish Nayak
2025-08-12 23:13:03 +01:00
parent 540db21c45
commit bacdc8ea0f
12 changed files with 262 additions and 134 deletions
+29 -10
View File
@@ -5,25 +5,29 @@ CREATE KEYSPACE IF NOT EXISTS payphone
} AND TABLETS = {
'enabled': false
};
CREATE TYPE IF NOT EXISTS payphone.message (
id BIGINT,
CREATE TYPE IF NOT EXISTS payphone.message_metadata (
call_id BIGINT,
author_id BIGINT,
author_name TEXT,
author_avatar_url TEXT,
author_mask ASCII,
content TEXT,
attachments LIST<TEXT>,
sticker BIGINT,
propagation_message_id BIGINT,
propagation_channel_id BIGINT,
replying_to_id BIGINT,
message_replied_to_metadata FROZEN<payphone.message_metadata>,
replying_to_id,
is_deleted BOOLEAN,
is_edited BOOLEAN,
is_censored BOOLEAN
is_censored BOOLEAN,
);
CREATE TABLE IF NOT EXISTS payphone.users (
user_id BIGINT PRIMARY KEY,
@@ -82,7 +86,9 @@ CREATE TABLE IF NOT EXISTS payphone.participants (
CREATE TABLE IF NOT EXISTS payphone.messages (
call_id BIGINT,
message_id BIGINT,
message_metadata FROZEN<payphone.message_metadata>,
data FROZEN<payphone.message>,
PRIMARY KEY (call_id, message_id)
);
@@ -92,31 +98,44 @@ CREATE TABLE IF NOT EXISTS payphone.servers (
name TEXT,
prefix TEXT,
);
CREATE TABLE IF NOT EXISTS payphone.reports (
report_id BIGINT,
message FROZEN<payphone.message_metadata>,
message FROZEN<payphone.message>,
replying_to FROZEN<payphone.message>,
created_at TIMESTAMP,
reviewed_at TIMESTAMP,
created_by_ids SET<BIGINT>,
reviewed_by_id BIGINT,
resolution ASCII,
PRIMARY KEY (report_id)
PRIMARY KEY (message_author_id, report_id)
);
CREATE TABLE IF NOT EXISTS payphone.user_incidents (
user_id BIGINT,
incident_id BIGINT,
-- ban, warning
type ASCII,
call_id BIGINT,
report_id BIGINT,
message FROZEN<payphone.message_metadata>,
message FROZEN<payphone.message>,
replying_to FROZEN<payphone.message>,
reason TEXT,
created_by_id BIGINT,
created_at TIMESTAMP,
expires_at TIMESTAMP,
duration ASCII,
PRIMARY KEY (user_id)
);