Add slots based per class, admin courses mgmt, admin roles, horizontal nav/landing, glove favicon

This commit is contained in:
Wycz
2026-09-08 09:10:37 +02:00
parent 3f4fdeba99
commit 7556b2cd97
15 changed files with 439 additions and 74 deletions
+12
View File
@@ -162,3 +162,15 @@ model Absence {
date DateTime
reason String?
}
model ClassSlot {
id String @id @default(cuid())
slug String @unique
label String
sport String
time String
capacity Int @default(20)
booked Int @default(0)
isFull Boolean @default(false)
updatedAt DateTime @updatedAt
}
+14
View File
@@ -43,6 +43,20 @@ async function main() {
}
}
// Créer les créneaux de cours par défaut
const slots = [
{ slug: "muay-mardi", label: "Mardi", sport: "muay-thai", time: "19h00 – 21h00", capacity: 20, booked: 16 },
{ slug: "muay-vendredi", label: "Vendredi", sport: "muay-thai", time: "20h00 – 22h00", capacity: 20, booked: 6 },
{ slug: "yoga-lundi", label: "Lundi", sport: "yoga", time: "19h30 – 20h30", capacity: 15, booked: 5 },
];
for (const s of slots) {
const exists = await prisma.classSlot.findUnique({ where: { slug: s.slug } });
if (!exists) {
await prisma.classSlot.create({ data: s });
console.log(`✅ Créneau créé: ${s.slug}`);
}
}
console.log("Seed terminé ✅");
}