-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.prisma
40 lines (36 loc) · 928 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
40
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
binaryTargets = "native"
}
model Recipe {
id String @id @default(cuid())
name String
cuisine String? @default("Tasty")
createdAt DateTime @default(now())
content String
imageUrl String?
blurb String?
categoryId String?
category Category? @relation(fields: [categoryId], references: [id])
users User[]
}
model Category {
id String @id @default(cuid())
name String
imageUrl String?
recipes Recipe[]
}
model User {
id Int @id @default(autoincrement())
email String @unique
hashedPassword String
salt String
resetToken String?
resetTokenExpiresAt DateTime?
roles String @default("USER")
recipes Recipe[]
}