feat: implement meal planning feature with CRUD operations and UI integration

This commit is contained in:
Nils-Johan Gynther
2026-04-16 19:37:09 +02:00
parent 8b12df4aa4
commit 1b82b02021
13 changed files with 468 additions and 1 deletions
+14 -1
View File
@@ -69,7 +69,8 @@ model Recipe {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
ingredients RecipeIngredient[]
ingredients RecipeIngredient[]
mealPlanEntries MealPlanEntry[]
}
model RecipeIngredient {
@@ -92,4 +93,16 @@ model PantryItem {
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model MealPlanEntry {
id Int @id @default(autoincrement())
date DateTime @db.Date
recipe Recipe @relation(fields: [recipeId], references: [id], onDelete: Cascade)
recipeId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([date])
@@index([date])
}