refactor-db #33

Merged
vivy-agent merged 42 commits from refactor-db into main 2026-05-26 21:33:21 +07:00
7 changed files with 7616 additions and 2366 deletions
Showing only changes of commit 03acd7be29 - Show all commits

View File

@ -133,6 +133,7 @@ model User {
comments Comment[] comments Comment[]
comment_likes CommentLike[] comment_likes CommentLike[]
comment_audit_logs CommentAuditLog[] comment_audit_logs CommentAuditLog[]
comment_reports CommentReport[]
@@index([email]) @@index([email])
@@index([username]) @@index([username])
@@map("users") @@map("users")
@ -664,6 +665,7 @@ model Comment {
episode_id String @db.Uuid episode_id String @db.Uuid
likes CommentLike[] likes CommentLike[]
audit_logs CommentAuditLog[] audit_logs CommentAuditLog[]
reports CommentReport[]
@@map("comments") @@map("comments")
} }
@ -691,6 +693,21 @@ model CommentAuditLog {
@@map("comment_audit_logs") @@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")
}
/** /**