Skip to content

Commit

Permalink
feat: added permissions to Role model
Browse files Browse the repository at this point in the history
  • Loading branch information
shelleychen318 committed Oct 21, 2023
1 parent 8d087bd commit d2bb6f2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions backend/typescript/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ model Warning {

model Staff {
id Int @id @default(autoincrement())
roleId Int
role Role @relation(fields: [roleId], references: [id])
role_id Int
role Role @relation(fields: [role_id], references: [id])
first_name String
last_name String
email String @unique
Expand All @@ -99,9 +99,16 @@ model Staff {
}

model Role {
id Int @id @default(autoincrement())
title String @unique
staff Staff[]
id Int @id @default(autoincrement())
title String @unique
can_modify_roles Boolean
can_modify_tasks Boolean
can_give_warnings Boolean
can_modify_credits Boolean
can_view_statistics Boolean
can_modify_resident_tasks Boolean
can_assign_resident_tasks Boolean
staff Staff[]
}

model Resident {
Expand Down

0 comments on commit d2bb6f2

Please sign in to comment.