upd: webpush

Deskripsi:
- database push notification
- update package
- memasang webpush

NO Issues
This commit is contained in:
amel
2024-11-18 17:12:58 +08:00
parent bc5ce5b48c
commit d847c97bec
30 changed files with 1267 additions and 282 deletions

View File

@@ -124,6 +124,7 @@ model User {
DivisionCalendarMember DivisionCalendarMember[]
Notifications Notifications[] @relation("UserToUser")
Notifications2 Notifications[] @relation("UserFromUser")
Subscribe Subscribe[]
}
model UserLog {
@@ -494,11 +495,6 @@ model BannerImage {
updatedAt DateTime @updatedAt
}
model Subscription {
id String @id @default(cuid())
data Json
}
model Notifications {
id String @id @default(cuid())
User1 User @relation("UserToUser", fields: [idUserTo], references: [id], map: "UserToUserMap")
@@ -514,3 +510,12 @@ model Notifications {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model Subscribe {
id String @id @default(cuid())
User User @relation(fields: [idUser], references: [id])
idUser String @unique
subscription String @db.Text
createdAt DateTime? @default(now())
updatedAt DateTime? @updatedAt
}