Files
bikeApp/prisma/schema.prisma
T
fegger 45cf61525e Switch database from SQLite to PostgreSQL
Replace in-memory JSON file storage with Prisma ORM using PostgreSQL.
Update environment variables and Prisma schema accordingly.
2026-05-19 14:19:01 +02:00

69 lines
1.6 KiB
Plaintext

generator client {
provider = "prisma-client-js"
output = "../node_modules/.prisma/client"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model Product {
id String @id
category String
position String?
brand String
model String
imagePath String?
specs String
setup String
sources String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model BikeBuild {
id String @id @default(cuid())
name String
riderWeightKg Int
discipline String
riderLevel String
rideStyle String
frameId String?
forkId String?
shockId String?
frontTireId String?
rearTireId String?
setup String
imagePath String?
reviews RideReview[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model RideReview {
id String @id @default(cuid())
buildId String
build BikeBuild @relation(fields: [buildId], references: [id], onDelete: Cascade)
suspFeel Int
frontGrip Int
rearGrip Int
rollSpeed Int
confidence Int
bottomOut Boolean @default(false)
harshHit Boolean @default(false)
wallow Boolean @default(false)
smallBump Boolean @default(false)
notes String?
advice String?
createdAt DateTime @default(now())
}
model RiderPreference {
id String @id @default("default")
harshTendency Int @default(0)
softTendency Int @default(0)
gripPreference Int @default(0)
updatedAt DateTime @updatedAt
}