feat: add notification database structure
This commit is contained in:
parent
456f08b82e
commit
3391a53daf
1 changed files with 18 additions and 0 deletions
|
|
@ -12,6 +12,22 @@ datasource db {
|
||||||
url = env("DATABASE_URL")
|
url = env("DATABASE_URL")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model Notification {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
|
||||||
|
title String
|
||||||
|
detail String
|
||||||
|
|
||||||
|
groupReceiver String
|
||||||
|
|
||||||
|
receiver User? @relation(name: "NotificationReceiver", fields: [receiverId], references: [id], onDelete: Cascade)
|
||||||
|
receiverId String?
|
||||||
|
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
|
||||||
|
readByUser User[]
|
||||||
|
}
|
||||||
|
|
||||||
model Menu {
|
model Menu {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
|
|
@ -426,6 +442,8 @@ model User {
|
||||||
flowUpdated WorkflowTemplate[] @relation("FlowUpdatedByUser")
|
flowUpdated WorkflowTemplate[] @relation("FlowUpdatedByUser")
|
||||||
invoiceCreated Invoice[]
|
invoiceCreated Invoice[]
|
||||||
paymentCreated Payment[]
|
paymentCreated Payment[]
|
||||||
|
notificationReceive Notification[] @relation("NotificationReceiver")
|
||||||
|
notificationRead Notification[]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CustomerType {
|
enum CustomerType {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue