feat: implement pwa push notifications
This commit is contained in:
@@ -21,6 +21,7 @@ model Plan {
|
||||
litterInterval Int @default(2)
|
||||
createdAt DateTime @default(now())
|
||||
bookings Booking[]
|
||||
pushSubscriptions PushSubscription[]
|
||||
}
|
||||
|
||||
model Booking {
|
||||
@@ -35,3 +36,13 @@ model Booking {
|
||||
|
||||
@@unique([planId, date, sitterName])
|
||||
}
|
||||
|
||||
model PushSubscription {
|
||||
id String @id @default(cuid())
|
||||
planId String
|
||||
plan Plan @relation(fields: [planId], references: [id], onDelete: Cascade)
|
||||
endpoint String @unique
|
||||
p256dh String
|
||||
auth String
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user