From 2e9bfe5fcaa691a18a68e2b2518689e2e9f19d09 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Wed, 30 Oct 2024 08:49:24 +0700 Subject: [PATCH] chore: add database relation for notification group --- prisma/schema.prisma | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6f93fb6..0e7bab1 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -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())