mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Changes from https://github.com/planetscale/nextjs-starter. Realized the current example was not only out of date, but the demo was broken. Will update the demo site post-merge here 👍
30 lines
687 B
Plaintext
30 lines
687 B
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
previewFeatures = ["referentialIntegrity"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "mysql"
|
|
url = env("DATABASE_URL")
|
|
referentialIntegrity = "prisma"
|
|
}
|
|
|
|
model Product {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
description String
|
|
price Decimal
|
|
image String
|
|
category Category? @relation(fields: [category_id], references: [id])
|
|
category_id Int
|
|
|
|
@@index([category_id])
|
|
}
|
|
|
|
model Category {
|
|
id Int @id @default(autoincrement())
|
|
name String
|
|
description String
|
|
products Product[]
|
|
}
|