feat(flyer-import): add bundle support and new product fields
- Add bundle support with isBundle, bundleWeight, and bundleItems fields - Add brand, weight, and comparisonUnit fields to FlyerItem model - Update AI flyer parser to extract bundle information - Add sanitization for bundle items in FlyerNormalizerService - Update DTOs and interfaces to include new fields - Add migration for new database fields - Update tests to cover bundle item handling
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `FlyerItem`
|
||||
ADD COLUMN `brand` VARCHAR(191) NULL,
|
||||
ADD COLUMN `weight` VARCHAR(191) NULL,
|
||||
ADD COLUMN `bundleWeight` VARCHAR(191) NULL,
|
||||
ADD COLUMN `isBundle` BOOLEAN NOT NULL DEFAULT false,
|
||||
ADD COLUMN `bundleItems` JSON NULL;
|
||||
@@ -313,12 +313,17 @@ model FlyerItem {
|
||||
sessionId Int
|
||||
rawName String
|
||||
normalizedName String
|
||||
brand String?
|
||||
categoryHint String?
|
||||
categoryId Int?
|
||||
price Decimal? @db.Decimal(10, 2)
|
||||
priceUnit String?
|
||||
comparisonPrice Decimal? @db.Decimal(10, 2)
|
||||
comparisonUnit String?
|
||||
weight String?
|
||||
bundleWeight String?
|
||||
isBundle Boolean @default(false)
|
||||
bundleItems Json?
|
||||
offerText String?
|
||||
parseConfidence Float
|
||||
parseReasons Json?
|
||||
|
||||
Reference in New Issue
Block a user