File size: 979 Bytes
55f4b0b | 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 | datasource db {
provider = "sqlite"
// Wasp requires that the url is set to the DATABASE_URL environment variable.
// For production deployment switch provider to "postgresql" (SQLite is unsupported in prod).
url = env("DATABASE_URL")
}
// Wasp requires the `prisma-client-js` generator to be present.
generator client {
provider = "prisma-client-js"
}
model User {
id Int @id @default(autoincrement())
specs Spec[]
}
model Spec {
id Int @id @default(autoincrement())
title String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
sections Section[]
user User @relation(fields: [userId], references: [id])
userId Int
}
model Section {
id Int @id @default(autoincrement())
key String
title String
hint String
content String
order Int
spec Spec @relation(fields: [specId], references: [id], onDelete: Cascade)
specId Int
@@unique([specId, key])
} |