notification implemented
This commit is contained in:
@@ -377,6 +377,7 @@ enum AdminAction {
|
||||
}
|
||||
|
||||
enum NotificationType {
|
||||
ACCOUNT_CREATED
|
||||
NEW_BOOKING
|
||||
BOOKING_CANCELLED
|
||||
PAYMENT_RECEIVED
|
||||
@@ -540,6 +541,7 @@ model BillingAccount {
|
||||
isPrimary Boolean @default(true)
|
||||
legalName String
|
||||
billingEmail String
|
||||
preferredLanguage String @default("en")
|
||||
billingAddress Json?
|
||||
taxId String?
|
||||
taxExempt Boolean @default(false)
|
||||
@@ -1218,6 +1220,8 @@ model Notification {
|
||||
body String
|
||||
data Json?
|
||||
channel NotificationChannel
|
||||
templateKey String?
|
||||
locale String @default("en")
|
||||
status NotificationStatus @default(PENDING)
|
||||
sentAt DateTime?
|
||||
failReason String?
|
||||
@@ -1231,6 +1235,26 @@ model Notification {
|
||||
@@map("notifications")
|
||||
}
|
||||
|
||||
model NotificationTemplate {
|
||||
id String @id @default(cuid())
|
||||
templateKey String
|
||||
category String
|
||||
channel NotificationChannel
|
||||
locale String
|
||||
subject String?
|
||||
body String
|
||||
requiredVariables Json?
|
||||
optionalVariables Json?
|
||||
version Int @default(1)
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@unique([templateKey, channel, locale, version])
|
||||
@@index([templateKey, channel, locale, isActive])
|
||||
@@map("notification_templates")
|
||||
}
|
||||
|
||||
model NotificationPreference {
|
||||
id String @id @default(cuid())
|
||||
employeeId String?
|
||||
|
||||
Reference in New Issue
Block a user