feat(inventory): add multi-country origin tracking
- Added `originCountries` field to `InventoryItem` model for multi-country origin support - Updated `CreateInventoryDto` and `UpdateInventoryDto` with `originCountries` array field - Modified `InventoryService` to handle `originCountries` in create and update operations - Added `origin` field to `FlyerImportItem` response type for consistency - Added `categoryId` field to `ParsedReceiptItem` DTO for improved receipt parsing - Created database migration `20260524_add_origin_countries` for schema changes
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
-- Add originCountries field to InventoryItem table
|
||||
-- This migration adds support for multiple origin countries as a JSON array
|
||||
|
||||
ALTER TABLE `InventoryItem`
|
||||
ADD COLUMN `originCountries` JSON NULL
|
||||
AFTER `origin`;
|
||||
|
||||
-- Create an index for the originCountries field for better query performance
|
||||
CREATE INDEX `IDX_InventoryItem_originCountries` ON `InventoryItem` ((CAST(`originCountries` AS CHAR(255))));
|
||||
@@ -104,6 +104,7 @@ model InventoryItem {
|
||||
unit String
|
||||
brand String?
|
||||
origin String?
|
||||
originCountries Json?
|
||||
receiptName String?
|
||||
location String?
|
||||
purchaseDate DateTime?
|
||||
|
||||
Reference in New Issue
Block a user