feat(pricing): add price rule entity (#5050)

**What**
- add price-rule entity to pricing module

blocked by #4977 

Fixes CORE-1497

Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>
Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Philip Korsholm
2023-09-26 12:59:55 +00:00
committed by GitHub
co-authored by Riqwan Thamir Adrien de Peretti
parent b3f1135fba
commit bc42b201ea
20 changed files with 1444 additions and 18 deletions
@@ -0,0 +1,24 @@
import { CreatePriceRuleDTO } from "@medusajs/types"
export const defaultPriceRuleData = [
{
id: "price-rule-1",
price_set_id: "price-set-1",
rule_type_id: "rule-type-1",
value: "region_1",
price_list_id: "test",
price_set_money_amount: {
money_amount: { amount: 100, currency_code: "EUR" },
},
},
{
id: "price-rule-2",
price_set_id: "price-set-2",
rule_type_id: "rule-type-1",
value: "region_2",
price_list_id: "test",
price_set_money_amount: {
money_amount: { amount: 100, currency_code: "EUR" },
},
},
] as unknown as CreatePriceRuleDTO[]