From 03acd7be29cbc71932398c12bef1baf875c612c7 Mon Sep 17 00:00:00 2001 From: Rafi Arrafif Date: Tue, 26 May 2026 20:57:59 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20db:=20add=20comment=20r?= =?UTF-8?q?eport=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/schema.prisma | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 1587e24..94ffe80 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -133,6 +133,7 @@ model User { comments Comment[] comment_likes CommentLike[] comment_audit_logs CommentAuditLog[] + comment_reports CommentReport[] @@index([email]) @@index([username]) @@map("users") @@ -664,6 +665,7 @@ model Comment { episode_id String @db.Uuid likes CommentLike[] audit_logs CommentAuditLog[] + reports CommentReport[] @@map("comments") } @@ -686,11 +688,26 @@ model CommentAuditLog { action audit_action created_at DateTime @default(now()) @db.Timestamptz() - comment_id String @db.Uuid + comment_id String @db.Uuid performed_by_id String @db.Uuid @@map("comment_audit_logs") } +model CommentReport { + id String @id @db.Uuid @default(uuid(7)) + reporter User @relation(fields: [reporter_id], references: [id]) + comment Comment @relation(fields: [comment_id], references: [id]) + title String @db.VarChar(115) + status status_submission + description String? @db.Text + reported_at DateTime @default(now()) @db.Timestamptz() + closed_at DateTime? @db.Timestamptz() + + reporter_id String @db.Uuid + comment_id String @db.Uuid + @@map("comment_reports") +} + /**