🗃️ db: add comment report schema
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 1m38s
All checks were successful
Integration Tests / integration-tests (pull_request) Successful in 1m38s
This commit is contained in:
@ -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")
|
||||
}
|
||||
|
||||
@ -691,6 +693,21 @@ model CommentAuditLog {
|
||||
@@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")
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user