chore: pricing models uses standardized relationships attributes (#6767)

what:

- all relationships under all models are standardized
This commit is contained in:
Riqwan Thamir
2024-03-21 10:01:52 +00:00
committed by GitHub
parent d930ebc1ed
commit cf8b5ce85b
16 changed files with 157 additions and 402 deletions
@@ -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",
})