Skip to content

Commit

Permalink
fix(transform): add owning shopId to product
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Apr 11, 2024
1 parent 4b6d194 commit 29ae783
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
6 changes: 3 additions & 3 deletions datasets/demo-shop/data/sample-data/orders.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions datasets/demo-shop/generator/catalog/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ const yaml = require('js-yaml');

const FILE_SLICE = 500;

const SHOP_IDS = [
'restorecommerce-demo-shop-000',
];

const meta = {
modifiedBy: '',
owners: [
Expand Down Expand Up @@ -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: {
Expand Down
26 changes: 13 additions & 13 deletions datasets/system/data/seed-data/taxes.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 29ae783

Please sign in to comment.