chore: add database relation for notification group
This commit is contained in:
parent
a27d725ae5
commit
2e9bfe5fca
1 changed files with 9 additions and 1 deletions
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue