106 lines
2.9 KiB
Plaintext
106 lines
2.9 KiB
Plaintext
// This is your Prisma schema file,
|
||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||
|
||
generator client {
|
||
provider = "prisma-client"
|
||
output = "../src/generated/prisma"
|
||
}
|
||
|
||
datasource db {
|
||
provider = "sqlite"
|
||
}
|
||
|
||
model User {
|
||
id String @id @default(cuid())
|
||
email String @unique
|
||
passwordHash String
|
||
createdAt DateTime @default(now())
|
||
}
|
||
|
||
model Ingredient {
|
||
id String @id @default(cuid())
|
||
name String
|
||
price Float
|
||
imageUrl String?
|
||
createdAt DateTime @default(now())
|
||
updatedAt DateTime @updatedAt
|
||
waffles Waffle[]
|
||
}
|
||
|
||
model Waffle {
|
||
id String @id @default(cuid())
|
||
name String
|
||
/** Description textuelle affichée sur la fiche menu. */
|
||
ingredients String
|
||
price Float
|
||
isNew Boolean @default(false)
|
||
category String
|
||
imageUrl String?
|
||
createdAt DateTime @default(now())
|
||
updatedAt DateTime @updatedAt
|
||
ingredientItems Ingredient[]
|
||
}
|
||
|
||
model GalleryImage {
|
||
id String @id @default(cuid())
|
||
imageUrl String
|
||
alt String
|
||
sortOrder Int @default(0)
|
||
createdAt DateTime @default(now())
|
||
updatedAt DateTime @updatedAt
|
||
}
|
||
|
||
/** Une seule ligne (id = default) : textes affichés sur la page d’accueil et horaires. */
|
||
model SiteContent {
|
||
id String @id @default("default")
|
||
heroEyebrow String
|
||
heroTitle String
|
||
heroSubtitle String
|
||
heroBackgroundImageUrl String?
|
||
/** Logo affiché dans l’en-tête du site public */
|
||
logoUrl String?
|
||
/** true : texte sur l’image (héros) ; false : image seule, texte au-dessus du menu */
|
||
heroTextOverImage Boolean @default(true)
|
||
menuIntro String
|
||
galleryIntro String
|
||
scheduleIntro String @default("")
|
||
customWaffleTitle String @default("La gaufre sur mesure")
|
||
customWaffleDescription String @default("Composez votre gaufre en choisissant parmi nos ingrédients : chacun avec sa photo et son prix.")
|
||
customWaffleBasePrice Float @default(3)
|
||
customWaffleImageUrl String?
|
||
customWaffleVisible Boolean @default(true)
|
||
uploadImageWidth Int @default(1920)
|
||
uploadImageHeight Int @default(1080)
|
||
hours Json
|
||
updatedAt DateTime @updatedAt
|
||
}
|
||
|
||
/** Présence du food truck (calendrier « Où me trouver »). */
|
||
model TruckEvent {
|
||
id String @id @default(cuid())
|
||
eventDate String
|
||
timeLabel String @default("")
|
||
location String
|
||
note String @default("")
|
||
imageUrl String?
|
||
createdAt DateTime @default(now())
|
||
updatedAt DateTime @updatedAt
|
||
|
||
@@index([eventDate])
|
||
}
|
||
|
||
/** Règle hebdomadaire : répétée chaque semaine (0 = lundi … 6 = dimanche). */
|
||
model TruckEventRecurrence {
|
||
id String @id @default(cuid())
|
||
dayOfWeek Int
|
||
timeLabel String @default("")
|
||
location String
|
||
note String @default("")
|
||
imageUrl String?
|
||
active Boolean @default(true)
|
||
createdAt DateTime @default(now())
|
||
updatedAt DateTime @updatedAt
|
||
|
||
@@index([dayOfWeek])
|
||
}
|