feat: implement receipt alias functionality with CRUD operations and integrate with receipt import

This commit is contained in:
Nils-Johan Gynther
2026-04-16 21:06:16 +02:00
parent b8744f625b
commit af88a0dc81
11 changed files with 492 additions and 303 deletions
+9
View File
@@ -21,6 +21,7 @@ model Product {
inventoryItems InventoryItem[]
recipeIngredients RecipeIngredient[]
pantryItems PantryItem[]
receiptAliases ReceiptAlias[]
}
model InventoryItem {
@@ -95,6 +96,14 @@ model PantryItem {
updatedAt DateTime @updatedAt
}
model ReceiptAlias {
id Int @id @default(autoincrement())
receiptName String @unique // normaliserat kvittonamn (lowercase, trim)
productId Int
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
createdAt DateTime @default(now())
}
model MealPlanEntry {
id Int @id @default(autoincrement())
date DateTime @db.Date