From 29ae783cf51ae9a94ed851d0cb47e76c2ff5b57e Mon Sep 17 00:00:00 2001 From: Gerald Baulig Date: Thu, 11 Apr 2024 14:30:17 +0200 Subject: [PATCH] fix(transform): add owning shopId to product --- .../demo-shop/data/sample-data/orders.yaml | 6 ++--- .../demo-shop/generator/catalog/transform.js | 5 ++++ datasets/system/data/seed-data/taxes.yaml | 26 +++++++++---------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/datasets/demo-shop/data/sample-data/orders.yaml b/datasets/demo-shop/data/sample-data/orders.yaml index fb3e51d..3fda19a 100644 --- a/datasets/demo-shop/data/sample-data/orders.yaml +++ b/datasets/demo-shop/data/sample-data/orders.yaml @@ -71,7 +71,7 @@ - taxId: germany-standard-rate vat: 1.90 meta: - modifiedBy: "" + createdBy: restorecommerce-demo-customer-000-member-000 owners: - id: urn:restorecommerce:acs:names:ownerIndicatoryEntity value: urn:restorecommerce:acs:model:organization.Organization @@ -177,7 +177,7 @@ - taxId: germany-standard-rate vat: 64.9 meta: - modifiedBy: "" + createdBy: restorecommerce-demo-customer-000-member-000 owners: - id: urn:restorecommerce:acs:names:ownerIndicatoryEntity value: urn:restorecommerce:acs:model:organization.Organization @@ -267,7 +267,7 @@ - taxId: germany-standard-rate vat: 2.37 meta: - modifiedBy: "" + createdBy: restorecommerce-demo-customer-000-member-000 owners: - id: urn:restorecommerce:acs:names:ownerIndicatoryEntity value: urn:restorecommerce:acs:model:organization.Organization diff --git a/datasets/demo-shop/generator/catalog/transform.js b/datasets/demo-shop/generator/catalog/transform.js index 0903e44..1a024aa 100644 --- a/datasets/demo-shop/generator/catalog/transform.js +++ b/datasets/demo-shop/generator/catalog/transform.js @@ -6,6 +6,10 @@ const yaml = require('js-yaml'); const FILE_SLICE = 500; +const SHOP_IDS = [ + 'restorecommerce-demo-shop-000', +]; + const meta = { modifiedBy: '', owners: [ @@ -180,6 +184,7 @@ function parseInputLine(csvLine) { product: { name: productEntry, description: 'Dummy description for product ' + productEntry, + shopId: SHOP_IDS[0], manufacturerId: brandHash, taricCode: uuid.v4(), // no data available physical: { diff --git a/datasets/system/data/seed-data/taxes.yaml b/datasets/system/data/seed-data/taxes.yaml index dd967e6..16ac229 100644 --- a/datasets/system/data/seed-data/taxes.yaml +++ b/datasets/system/data/seed-data/taxes.yaml @@ -1,7 +1,7 @@ --- id: germany-reduced-rate rate: 0.07 - typeId: type-value-added-tax + typeId: value-added-tax variant: Reduced rate countryId: germany meta: @@ -15,7 +15,7 @@ --- id: germany-standard-rate rate: 0.19 - typeId: type-value-added-tax + typeId: value-added-tax variant: Standard rate countryId: germany meta: @@ -29,7 +29,7 @@ --- id: switzerland-heavily-reduced-rate rate: 0.025 - typeId: type-value-added-tax + typeId: value-added-tax variant: Heavily reduced rate countryId: switzerland meta: @@ -43,7 +43,7 @@ --- id: switzerland-reduced-rate rate: 0.038 - typeId: type-value-added-tax + typeId: value-added-tax variant: Reduced rate countryId: switzerland meta: @@ -58,7 +58,7 @@ id: switzerland-standard-rate rate: 0.08 countryId: switzerland - typeId: type-value-added-tax + typeId: value-added-tax variant: Standard rate meta: modifiedBy: system @@ -72,7 +72,7 @@ id: belgium-heavily-reduced-rate countryId: belgium rate: 0.06 - typeId: type-value-added-tax + typeId: value-added-tax variant: Heavily reduced rate meta: modifiedBy: system @@ -86,7 +86,7 @@ id: belgium-reduced-rate countryId: belgium rate: 0.12 - typeId: type-value-added-tax + typeId: value-added-tax variant: Reduced rate meta: modifiedBy: system @@ -100,7 +100,7 @@ id: belgium-standard-rate countryId: belgium rate: 0.21 - typeId: type-value-added-tax + typeId: value-added-tax variant: Standard rate meta: modifiedBy: system @@ -114,7 +114,7 @@ id: belgium-parking-rate countryId: belgium rate: 0.12 - typeId: type-value-added-tax + typeId: value-added-tax variant: Parking rate meta: modifiedBy: system @@ -128,7 +128,7 @@ id: france-heavily-reduced-rate countryId: france rate: 0.021 - typeId: type-value-added-tax + typeId: value-added-tax variant: heavily reduced rate meta: modifiedBy: system @@ -142,7 +142,7 @@ id: france-reduced-rate countryId: france rate: 0.055 - typeId: type-value-added-tax + typeId: value-added-tax variant: Reduced rate meta: modifiedBy: system @@ -156,7 +156,7 @@ id: france-lightly-reduced-rate countryId: france rate: 0.1 - typeId: type-value-added-tax + typeId: value-added-tax variant: Lightly reduced rate meta: modifiedBy: system @@ -170,7 +170,7 @@ id: france-standard-rate countryId: france rate: 0.2 - typeId: type-value-added-tax + typeId: value-added-tax variant: Standard rate meta: modifiedBy: system