This commit is contained in:
gpatruno
2026-06-11 17:30:13 +02:00
parent 36b4acb355
commit e45e9f154e
108 changed files with 9163 additions and 167 deletions
+105
View File
@@ -0,0 +1,105 @@
// 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 daccueil et horaires. */
model SiteContent {
id String @id @default("default")
heroEyebrow String
heroTitle String
heroSubtitle String
heroBackgroundImageUrl String?
/** Logo affiché dans len-tête du site public */
logoUrl String?
/** true : texte sur limage (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])
}