feat: Completely revamp the pricing module (#7852)

* feat: Completely revamp the pricing module

* chore: Update all places to the new pricing interfaces

* fix: Remove unnecessary join to itself

* chore: Add data migration for existing users

* fix: Apply the correct index to price rule
This commit is contained in:
Stevche Radevski
2024-07-01 09:47:03 +02:00
committed by GitHub
parent 1f360a3245
commit c661180c44
84 changed files with 661 additions and 3725 deletions
@@ -4,15 +4,14 @@ import {
MapToConfig,
Modules,
} from "@medusajs/utils"
import { Price, PriceList, PriceSet, RuleType } from "@models"
import { Price, PriceList, PriceSet } from "@models"
export const joinerConfig = defineJoinerConfig(Modules.PRICING, {
entityQueryingConfig: [PriceSet, PriceList, Price, RuleType],
entityQueryingConfig: [PriceSet, PriceList, Price],
linkableKeys: {
price_set_id: PriceSet.name,
price_list_id: PriceList.name,
price_id: Price.name,
rule_type_id: RuleType.name,
},
})