Skip to content

Commit

Permalink
Change Users to Residents within Notification_User model
Browse files Browse the repository at this point in the history
  • Loading branch information
KathleenX7 committed Oct 21, 2023
1 parent 840042d commit 033cc12
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/typescript/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,18 @@ model Resident {
}

model Notification {
id Int @id @default(autoincrement())
message String
authorId Int
author Staff @relation(fields: [authorId], references: [id])
createdAt DateTime @default(now())
users Notification_User[]
id Int @id @default(autoincrement())
message String
authorId Int
author Staff @relation(fields: [authorId], references: [id])
createdAt DateTime @default(now())
residents Notification_User[]
}

model Notification_User {
notification Notification @relation(fields: [notificationId], references: [id])
notificationId Int
recipient User @relation(fields: [recipientId], references: [id])
recipient Resident @relation(fields: [recipientId], references: [id])
recipientId Int
seen Boolean @default(false)
}

0 comments on commit 033cc12

Please sign in to comment.