add push settings
This commit is contained in:
@@ -40,6 +40,12 @@ enum AppReleasePlatform {
|
||||
WINDOWS
|
||||
}
|
||||
|
||||
enum PushPlatform {
|
||||
WEB
|
||||
ANDROID
|
||||
IOS
|
||||
}
|
||||
|
||||
model AppRelease {
|
||||
id String @id @default(uuid())
|
||||
platform AppReleasePlatform
|
||||
@@ -104,6 +110,7 @@ model User {
|
||||
sentFamilyInvites FamilyInvite[] @relation("FamilyInviteInviter")
|
||||
receivedFamilyInvites FamilyInvite[] @relation("FamilyInviteInvitee")
|
||||
notifications Notification[]
|
||||
pushDeviceTokens PushDeviceToken[]
|
||||
chatRoomMembers ChatRoomMember[]
|
||||
chatMessages ChatMessage[]
|
||||
chatPollVotes ChatPollVote[]
|
||||
@@ -437,6 +444,19 @@ model Notification {
|
||||
@@index([userId, isRead, createdAt])
|
||||
}
|
||||
|
||||
model PushDeviceToken {
|
||||
id String @id @default(uuid())
|
||||
userId String
|
||||
token String @unique
|
||||
platform PushPlatform @default(WEB)
|
||||
deviceLabel String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
model ChatRoom {
|
||||
id String @id @default(uuid())
|
||||
groupId String
|
||||
|
||||
Reference in New Issue
Block a user