Files
gaufrementbon/prisma/schema.prisma
T
2026-07-08 13:28:51 +02:00

131 lines
3.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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])
}
/** Métadonnées des avis Google (note globale, lien Maps). Une seule ligne (id = default). */
model GoogleReviewsMeta {
id String @id @default("default")
placeId String
rating Float?
reviewCount Int?
googleMapsUri String
syncedAt DateTime @updatedAt
}
/** Avis Google Maps synchronisés depuis lAPI Places. */
model GoogleReview {
id String @id
authorName String
authorUri String?
authorPhotoUri String?
rating Float
text String
relativeTime String @default("")
googleMapsUri String?
sortOrder Int @default(0)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}