feat: implement receipt alias functionality with CRUD operations and integrate with receipt import
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user