Skip to content

Commit

Permalink
Merge pull request #7 from uwblueprint/vaaranan-yaser/create-voluntee…
Browse files Browse the repository at this point in the history
…r-signup-request-model

Create volunteer signup request model (Vaaranan/Yaser)
  • Loading branch information
anmoltyagi1 authored Oct 26, 2023
2 parents f99c288 + d6dcdf0 commit 5a61cec
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions backend/typescript/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ model test {
}

model user {
id String @id @default(auto()) @map("_id") @db.ObjectId
id String @id @default(auto()) @map("_id") @db.ObjectId
authId String
email String
firstName String
lastName String
role Role
serviceRequests serviceRequest[]
volunteerSignUp volunteerPlatformSignUp[]
}

model serviceRequest {
id String @id @default(auto()) @map("_id") @db.ObjectId
id String @id @default(auto()) @map("_id") @db.ObjectId
requestName String
requester user @relation(fields: [requesterId], references: [id])
requesterId String @db.ObjectId
requester user @relation(fields: [requesterId], references: [id])
requesterId String @db.ObjectId
location String
shiftTime DateTime?
description String?
Expand All @@ -35,6 +36,16 @@ model serviceRequest {
requestType ServiceRequestType
}

model volunteerPlatformSignUp {
id String @id @default(auto()) @map("_id") @db.ObjectId
email String
firstName String
lastName String
admin user @relation(fields: [admin_id], references: [id])
admin_id String @db.ObjectId
status Status
}

enum Role {
VOLUNTEER
ADMIN
Expand All @@ -43,4 +54,9 @@ enum Role {
enum ServiceRequestType {
SITE
KITCHEN
}
}

enum Status {
PENDING
ACCEPTED
}

0 comments on commit 5a61cec

Please sign in to comment.