push 1 checkpoiint *holy hell i sure hope it works*

This commit is contained in:
Anish Nayak
2025-08-12 18:01:01 +01:00
parent 79f0ca08b2
commit 9549e70593
8 changed files with 310 additions and 67 deletions
+21 -55
View File
@@ -6,6 +6,23 @@ CREATE KEYSPACE IF NOT EXISTS payphone
'enabled': false
};
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,
is_deleted BOOLEAN,
is_edited BOOLEAN,
is_censored BOOLEAN
);
CREATE TABLE IF NOT EXISTS payphone.users (
user_id BIGINT PRIMARY KEY,
@@ -64,25 +81,7 @@ CREATE TABLE IF NOT EXISTS payphone.participants (
CREATE TABLE IF NOT EXISTS payphone.messages (
call_id BIGINT,
message_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,
is_deleted BOOLEAN,
is_edited BOOLEAN,
is_censored BOOLEAN,
message_metadata FROZEN<payphone.message_metadata>,
PRIMARY KEY (call_id, message_id)
);
@@ -95,61 +94,28 @@ CREATE TABLE IF NOT EXISTS payphone.servers (
CREATE TABLE IF NOT EXISTS payphone.reports (
report_id BIGINT,
message_author_id BIGINT,
message_author_name TEXT,
message_author_avatar_url TEXT,
message_author_mask ASCII,
message_id BIGINT,
message_content TEXT,
message_attachments LIST<TEXT>,
message_sticker BIGINT,
message_replying_to_id BIGINT,
message_replying_to_content TEXT,
message_replying_to_attachments LIST<TEXT>,
message_replying_to_sticker BIGINT,
message FROZEN<payphone.message_metadata>,
created_at TIMESTAMP,
reviewed_at TIMESTAMP,
created_by_ids SET<BIGINT>,
reviewed_by_id BIGINT,
resolution ASCII,
PRIMARY KEY (message_author_id, report_id)
PRIMARY KEY (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_id BIGINT,
message_content TEXT,
message_attachments LIST<TEXT>,
message_sticker BIGINT,
message_replying_to_id BIGINT,
message_replying_to_content TEXT,
message_replying_to_attachments LIST<TEXT>,
message_replying_to_sticker BIGINT,
message FROZEN<payphone.message_metadata>,
reason TEXT,
created_by_id BIGINT,
created_at TIMESTAMP,
expires_at TIMESTAMP,
duration ASCII,
PRIMARY KEY (user_id)
);