-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.prisma
40 lines (35 loc) · 1.2 KB
/
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
// This file is automatically generated by Keystone, do not modify it manually.
// Modify your Keystone config when you want to change this.
datasource postgresql {
url = env("DATABASE_URL")
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
provider = "postgresql"
}
generator client {
provider = "prisma-client-js"
}
model User {
id String @id @default(cuid())
name String @default("")
email String @unique @default("")
password String
createdAt DateTime? @default(now())
passwordResetToken String?
passwordResetIssuedAt DateTime?
passwordResetRedeemedAt DateTime?
}
model Product {
id String @id @default(cuid())
name String @default("")
description String @default("")
photo ProductImage? @relation("Product_photo", fields: [photoId], references: [id])
photoId String? @unique @map("photo")
status String? @default("DRAFT")
price Int?
}
model ProductImage {
id String @id @default(cuid())
image Json?
altText String @default("")
product Product? @relation("Product_photo")
}