chore: pricing models uses standardized relationships attributes (#6767)
what: - all relationships under all models are standardized
This commit is contained in:
1 parent
d930ebc1ed
commit
cf8b5ce85b
16 files changed
+157
-402
No files matched your search
@@ -1,12 +1,12 @@
|
||||
export const defaultPriceListRuleData = [
|
||||
{
|
||||
id: "price-list-rule-1",
|
||||
price_list: "price-list-1",
|
||||
rule_type: "rule-type-1",
|
||||
price_list_id: "price-list-1",
|
||||
rule_type_id: "rule-type-1",
|
||||
},
|
||||
{
|
||||
id: "price-list-rule-2",
|
||||
price_list: "price-list-1",
|
||||
rule_type: "rule-type-2",
|
||||
price_list_id: "price-list-1",
|
||||
rule_type_id: "rule-type-2",
|
||||
},
|
||||
]
|
||||
@@ -2,22 +2,22 @@ export const defaultPriceSetMoneyAmountsData = [
|
||||
{
|
||||
id: "price-set-money-amount-USD",
|
||||
title: "price set money amount USD",
|
||||
price_set: "price-set-1",
|
||||
money_amount: "money-amount-USD",
|
||||
price_set_id: "price-set-1",
|
||||
money_amount_id: "money-amount-USD",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "price-set-money-amount-EUR",
|
||||
title: "price set money amount EUR",
|
||||
price_set: "price-set-2",
|
||||
money_amount: "money-amount-EUR",
|
||||
price_set_id: "price-set-2",
|
||||
money_amount_id: "money-amount-EUR",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "price-set-money-amount-CAD",
|
||||
title: "price set money amount CAD",
|
||||
price_set: "price-set-3",
|
||||
money_amount: "money-amount-CAD",
|
||||
price_set_id: "price-set-3",
|
||||
money_amount_id: "money-amount-CAD",
|
||||
rules_count: 1,
|
||||
},
|
||||
]
|
||||
@@ -23,7 +23,7 @@ export async function createPriceSets(
|
||||
for (let moneyAmount of moneyAmountsData) {
|
||||
const psma = manager.create(PriceSetMoneyAmount, {
|
||||
price_set: priceSet,
|
||||
money_amount: moneyAmount.id,
|
||||
money_amount_id: moneyAmount.id,
|
||||
title: "test",
|
||||
})
|
||||
|
||||
|
||||
+18
-18
@@ -136,65 +136,65 @@ moduleIntegrationTestRunner({
|
||||
{
|
||||
id: "psma-PLN",
|
||||
title: "psma PLN",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-PLN",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-PLN",
|
||||
rules_count: 0,
|
||||
},
|
||||
{
|
||||
id: "psma-company_id-EUR",
|
||||
title: "psma EUR - company_id",
|
||||
price_set: "price-set-EUR",
|
||||
money_amount: "money-amount-company_id-EUR",
|
||||
price_set_id: "price-set-EUR",
|
||||
money_amount_id: "money-amount-company_id-EUR",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "psma-company_id-PLN",
|
||||
title: "psma PLN - company_id",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-company_id-PLN",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-company_id-PLN",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id-PLN",
|
||||
title: "psma PLN - region_id",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id-PLN",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id-PLN",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id+company_id-PLN",
|
||||
title: "psma region_id + company_id",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id+company_id-PLN",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id+company_id-PLN",
|
||||
rules_count: 2,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id-PLN-5-qty",
|
||||
title: "psma PLN - region_id 5 qty",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id-PLN-5-qty",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id-PLN-5-qty",
|
||||
rules_count: 1,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id_company_id-PL-EUR",
|
||||
title: "psma PLN - region_id PL with EUR currency",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id-PL-EUR",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id-PL-EUR",
|
||||
rules_count: 2,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id_company_id-PL-EUR-4-qty",
|
||||
title: "psma PLN - region_id PL with EUR currency for quantity 4",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id-PL-EUR-4-qty",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id-PL-EUR-4-qty",
|
||||
rules_count: 2,
|
||||
},
|
||||
{
|
||||
id: "psma-region_id_company_id-PL-EUR-customer-group",
|
||||
title:
|
||||
"psma PLN - region_id PL with EUR currency for customer group",
|
||||
price_set: "price-set-PLN",
|
||||
money_amount: "money-amount-region_id-PL-EUR-customer-group",
|
||||
price_set_id: "price-set-PLN",
|
||||
money_amount_id: "money-amount-region_id-PL-EUR-customer-group",
|
||||
rules_count: 3,
|
||||
},
|
||||
]
|
||||
|
||||
+3
-2
@@ -130,6 +130,7 @@ moduleIntegrationTestRunner({
|
||||
price_set: {
|
||||
id: "price-set-1",
|
||||
},
|
||||
price_set_id: "price-set-1",
|
||||
},
|
||||
])
|
||||
})
|
||||
@@ -283,8 +284,8 @@ moduleIntegrationTestRunner({
|
||||
const psma: PriceSetMoneyAmount = testManager.create(
|
||||
PriceSetMoneyAmount,
|
||||
{
|
||||
price_set: "price-set-1",
|
||||
money_amount: ma.id,
|
||||
price_set_id: "price-set-1",
|
||||
money_amount_id: ma.id,
|
||||
title: "test",
|
||||
rules_count: 0,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user