-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
39 lines (34 loc) · 864 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
37
38
39
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
relationMode = "prisma"
}
model Roomie {
id Int @id @default(autoincrement())
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
done Boolean @default(false)
dutyId Int? @unique
duty Duty? @relation(fields: [dutyId], references: [id])
}
model Duty {
id Int @id @default(autoincrement())
title String
description String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
roomie Roomie?
}
model Trash {
id Int @id @default(autoincrement())
title String
trashCollection TrashCollection[]
}
model TrashCollection {
date DateTime @id
trash Trash[]
}