Skip to content

Commit

Permalink
feat: create task data models
Browse files Browse the repository at this point in the history
  • Loading branch information
shelleychen318 committed Oct 14, 2023
1 parent 1f3378d commit ba0c3c3
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions backend/typescript/models/task.prisma
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
model Task {
id Int @id @default(autoincrement())
category Categories
title String
status Statuses
description String
// TODO: CHANGE THESE AFTER USER MODELS HAVE BEEN MADE
assignee String
assigner String
credit_value Float
start_date DateTime
end_date DateTime?
comments String
recurrence_frequency String?
// recurrence_days String // store days a comma separted string to be parsed for usage
warnings Warning[]
}

enum Categories {
HOUSEHOLD
CHORES
FINANCE
// other categories
}

enum Statuses {
PENDING_APPROVAL
INCOMPLETE
COMPLETE
EXCUSED
}

model Warning {
resident_id Int @id @default(autoincrement())
title String
description String
assigned_by String // change this to be Staff
date_issued DateTime
related_task Task? @relation(fields: [related_task_id], references: [id])
related_task_id Int?
}

0 comments on commit ba0c3c3

Please sign in to comment.