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
|
title String
|
||||||
detail String
|
detail String
|
||||||
|
|
||||||
groupReceiver String
|
groupReceiver NotificationGroup[]
|
||||||
|
|
||||||
receiver User? @relation(name: "NotificationReceiver", fields: [receiverId], references: [id], onDelete: Cascade)
|
receiver User? @relation(name: "NotificationReceiver", fields: [receiverId], references: [id], onDelete: Cascade)
|
||||||
receiverId String?
|
receiverId String?
|
||||||
|
|
@ -28,6 +28,14 @@ model Notification {
|
||||||
readByUser User[]
|
readByUser User[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model NotificationGroup {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
|
||||||
|
name String
|
||||||
|
|
||||||
|
notification Notification[]
|
||||||
|
}
|
||||||
|
|
||||||
model Menu {
|
model Menu {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue