49 lines
1.1 KiB
Plaintext
49 lines
1.1 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
}
|
|
|
|
model Restaurant {
|
|
id String @id @default(cuid())
|
|
name String
|
|
footerNote String?
|
|
categories Category[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model Category {
|
|
id String @id @default(cuid())
|
|
externalId String?
|
|
title String
|
|
restaurantId String
|
|
restaurant Restaurant @relation(fields: [restaurantId], references: [id])
|
|
items Item[]
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model Item {
|
|
id String @id @default(cuid())
|
|
name String
|
|
ingredients String?
|
|
tasteProfile String?
|
|
grapeVariety String?
|
|
price Json
|
|
categoryId String
|
|
category Category @relation(fields: [categoryId], references: [id])
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(cuid())
|
|
username String @unique
|
|
password String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|