Skip to content

Commit af14c25

Browse files
add category
1 parent ae0da5d commit af14c25

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

prisma/schema.prisma

+17-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ datasource db {
1010
}
1111

1212
model Task {
13-
id String @id @default(uuid())
13+
id String @id @default(uuid())
1414
title String
1515
description String?
16-
priority Priority?
17-
isDone Boolean? @default(false)
18-
createdAt DateTime @default(now())
19-
updatedAt DateTime @updatedAt
16+
priority Priority
17+
category TaskCategory @default(other)
18+
isDone Boolean? @default(false)
19+
createdAt DateTime @default(now())
20+
updatedAt DateTime @updatedAt
2021
userId String
21-
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
22+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
2223
2324
@@index([userId])
2425
}
@@ -78,3 +79,13 @@ enum Priority {
7879
MEDIUM
7980
LOW
8081
}
82+
83+
enum TaskCategory {
84+
health
85+
work
86+
education
87+
finance
88+
personal
89+
home
90+
other
91+
}

0 commit comments

Comments
 (0)