feat(inventory): add multi-country origin tracking
Test Suite / backend-pr-quick (push) Has been skipped
Test Suite / quick-import-pr-quick (push) Has been skipped
Test Suite / backend-full (push) Failing after 3m32s
Test Suite / flutter-quality (push) Failing after 1m0s

- 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:
Nils-Johan Gynther
2026-05-24 21:31:53 +02:00
parent ca1eed5061
commit 27d622bfe6
9 changed files with 167 additions and 66 deletions
@@ -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))));