forked from molomby/keystone-next-heroku-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.prisma
36 lines (31 loc) · 798 Bytes
/
schema.prisma
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
datasource postgresql {
url = env("DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
output = "node_modules/.prisma/client"
}
model Task {
id Int @id @default(autoincrement())
label String?
priority TaskPriorityEnum?
isComplete Boolean?
finishBy DateTime?
assignedTo Person? @relation("TaskassignedTo", fields: [assignedToId], references: [id])
assignedToId Int? @map("assignedTo")
@@index([assignedToId])
}
model Person {
id Int @id @default(autoincrement())
name String?
email String? @unique
password String?
isAdmin Boolean?
tasks Task[] @relation("TaskassignedTo")
}
enum TaskPriorityEnum {
low
medium
high
}