Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create volunteer signup request model (Vaaranan/Yaser) #7

Merged
Merged
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
}