feat: add moderation center for reports and ratings with user cleanup cron job
This commit is contained in:
@@ -245,16 +245,16 @@ model AnalyticsEvent {
|
||||
model Rating {
|
||||
id String @id @default(uuid())
|
||||
value Int
|
||||
userId String
|
||||
businessId String
|
||||
userId String?
|
||||
businessId String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
comment String?
|
||||
reply String?
|
||||
replyAt DateTime?
|
||||
status RatingStatus @default(PENDING)
|
||||
business Business @relation(fields: [businessId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
business Business? @relation(fields: [businessId], references: [id], onDelete: Cascade)
|
||||
user User? @relation(fields: [userId], references: [id], onDelete: SetNull)
|
||||
|
||||
@@unique([userId, businessId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user