chore: add database relation for notification group

This commit is contained in:
Methapon Metanipat 2024-10-30 08:49:24 +07:00
parent a27d725ae5
commit 2e9bfe5fca

View file

@ -18,7 +18,7 @@ model Notification {
title String
detail String
groupReceiver String
groupReceiver NotificationGroup[]
receiver User? @relation(name: "NotificationReceiver", fields: [receiverId], references: [id], onDelete: Cascade)
receiverId String?
@ -28,6 +28,14 @@ model Notification {
readByUser User[]
}
model NotificationGroup {
id String @id @default(cuid())
name String
notification Notification[]
}
model Menu {
id String @id @default(cuid())