Files
lunaqrmenu/prisma/schema.prisma

50 lines
1.2 KiB
Plaintext

generator client {
provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
}
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
}