feat: auto populate machine structures and seed sample data

This commit is contained in:
Matthieu
2025-10-13 09:01:33 +02:00
parent b7682ac312
commit dc4a12440b
21 changed files with 2218 additions and 7267 deletions

View File

@@ -0,0 +1,3 @@
-- Add JSON column to store instantiated structure selections on components
ALTER TABLE "composants"
ADD COLUMN IF NOT EXISTS "structure" JSONB;

View File

@@ -84,6 +84,7 @@ model Composant {
prix Decimal? @db.Decimal(10, 2)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
structure Json?
typeComposantId String?
typeComposant ModelType? @relation("ModelTypeComponentAssignments", fields: [typeComposantId], references: [id])