chore: joiner config entity property (#9084)
This commit is contained in:
committed by
GitHub
parent
28dc8d4d17
commit
fdd0543011
@@ -11,15 +11,14 @@ export const CartPaymentCollection: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["cart_payment_collection", "cart_payment_collections"],
|
||||
args: {
|
||||
entity: "LinkCartPaymentCollection",
|
||||
},
|
||||
entity: "LinkCartPaymentCollection",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "cart_id", "payment_collection_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "id",
|
||||
foreignKey: "cart_id",
|
||||
alias: "cart",
|
||||
@@ -29,6 +28,7 @@ export const CartPaymentCollection: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PAYMENT,
|
||||
entity: "PaymentCollection",
|
||||
primaryKey: "id",
|
||||
foreignKey: "payment_collection_id",
|
||||
alias: "payment_collection",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const CartPromotion: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["cart_promotion", "cart_promotions"],
|
||||
args: {
|
||||
entity: "LinkCartPromotion",
|
||||
},
|
||||
entity: "LinkCartPromotion",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "cart_id", "promotion_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "id",
|
||||
foreignKey: "cart_id",
|
||||
alias: "cart",
|
||||
@@ -29,6 +28,7 @@ export const CartPromotion: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PROMOTION,
|
||||
entity: "Promotion",
|
||||
primaryKey: "id",
|
||||
foreignKey: "promotion_id",
|
||||
alias: "promotions",
|
||||
|
||||
@@ -11,13 +11,14 @@ export const LocationFulfillmentProvider: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["location_fulfillment_provider", "location_fulfillment_providers"],
|
||||
args: { entity: "LinkLocationFulfillmentProvider" },
|
||||
entity: "LinkLocationFulfillmentProvider",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "stock_location_id", "fulfillment_provider_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.STOCK_LOCATION,
|
||||
entity: "StockLocation",
|
||||
primaryKey: "id",
|
||||
foreignKey: "stock_location_id",
|
||||
alias: "location",
|
||||
@@ -25,6 +26,7 @@ export const LocationFulfillmentProvider: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "FulfillmentProvider",
|
||||
primaryKey: "id",
|
||||
foreignKey: "fulfillment_provider_id",
|
||||
alias: "fulfillment_provider",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const LocationFulfillmentSet: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["location_fulfillment_set", "location_fulfillment_sets"],
|
||||
args: {
|
||||
entity: "LinkLocationFulfillmentSet",
|
||||
},
|
||||
entity: "LinkLocationFulfillmentSet",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "stock_location_id", "fulfillment_set_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.STOCK_LOCATION,
|
||||
entity: "StockLocation",
|
||||
primaryKey: "id",
|
||||
foreignKey: "stock_location_id",
|
||||
alias: "location",
|
||||
@@ -29,6 +28,7 @@ export const LocationFulfillmentSet: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "FulfillmentSet",
|
||||
primaryKey: "id",
|
||||
foreignKey: "fulfillment_set_id",
|
||||
alias: "fulfillment_set",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const OrderCart: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["order_cart", "order_carts"],
|
||||
args: {
|
||||
entity: "LinkOrderCart",
|
||||
},
|
||||
entity: "LinkOrderCart",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "order_id", "cart_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "id",
|
||||
foreignKey: "order_id",
|
||||
alias: "order",
|
||||
@@ -29,6 +28,7 @@ export const OrderCart: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "id",
|
||||
foreignKey: "cart_id",
|
||||
alias: "cart",
|
||||
|
||||
@@ -14,15 +14,14 @@ export const OrderClaimPaymentCollection: ModuleJoinerConfig = {
|
||||
"order_claim_payment_collection",
|
||||
"order_claim_payment_collections",
|
||||
],
|
||||
args: {
|
||||
entity: "LinkOrderClaimPaymentCollection",
|
||||
},
|
||||
entity: "LinkOrderClaimPaymentCollection",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "claim_id", "payment_collection_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "OrderClaim",
|
||||
primaryKey: "id",
|
||||
foreignKey: "claim_id",
|
||||
alias: "order",
|
||||
@@ -32,6 +31,7 @@ export const OrderClaimPaymentCollection: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PAYMENT,
|
||||
entity: "PaymentCollection",
|
||||
primaryKey: "id",
|
||||
foreignKey: "payment_collection_id",
|
||||
alias: "payment_collection",
|
||||
|
||||
@@ -14,15 +14,14 @@ export const OrderExchangePaymentCollection: ModuleJoinerConfig = {
|
||||
"order_exchange_payment_collection",
|
||||
"order_exchange_payment_collections",
|
||||
],
|
||||
args: {
|
||||
entity: "LinkOrderExchangePaymentCollection",
|
||||
},
|
||||
entity: "LinkOrderExchangePaymentCollection",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "exchange_id", "payment_collection_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "OrderExchange",
|
||||
primaryKey: "id",
|
||||
foreignKey: "exchange_id",
|
||||
alias: "order",
|
||||
@@ -32,6 +31,7 @@ export const OrderExchangePaymentCollection: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PAYMENT,
|
||||
entity: "PaymentCollection",
|
||||
primaryKey: "id",
|
||||
foreignKey: "payment_collection_id",
|
||||
alias: "payment_collection",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const OrderFulfillment: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["order_fulfillment", "order_fulfillments"],
|
||||
args: {
|
||||
entity: "LinkOrderFulfillment",
|
||||
},
|
||||
entity: "LinkOrderFulfillment",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "order_id", "fulfillment_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "id",
|
||||
foreignKey: "order_id",
|
||||
alias: "order",
|
||||
@@ -29,11 +28,11 @@ export const OrderFulfillment: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "Fulfillment",
|
||||
primaryKey: "id",
|
||||
foreignKey: "fulfillment_id",
|
||||
alias: "fulfillments",
|
||||
args: {
|
||||
// TODO: We are not suppose to know the module implementation here, wait for later to think about inferring it
|
||||
methodSuffix: "Fulfillments",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -11,15 +11,14 @@ export const OrderPaymentCollection: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["order_payment_collection", "order_payment_collections"],
|
||||
args: {
|
||||
entity: "LinkOrderPaymentCollection",
|
||||
},
|
||||
entity: "LinkOrderPaymentCollection",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "order_id", "payment_collection_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "id",
|
||||
foreignKey: "order_id",
|
||||
alias: "order",
|
||||
@@ -29,6 +28,7 @@ export const OrderPaymentCollection: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PAYMENT,
|
||||
entity: "PaymentCollection",
|
||||
primaryKey: "id",
|
||||
foreignKey: "payment_collection_id",
|
||||
alias: "payment_collection",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const OrderPromotion: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["order_promotion", "order_promotions"],
|
||||
args: {
|
||||
entity: "LinkOrderPromotion",
|
||||
},
|
||||
entity: "LinkOrderPromotion",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "order_id", "promotion_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "id",
|
||||
foreignKey: "order_id",
|
||||
alias: "order",
|
||||
@@ -29,6 +28,7 @@ export const OrderPromotion: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PROMOTION,
|
||||
entity: "Promotion",
|
||||
primaryKey: "id",
|
||||
foreignKey: "promotion_id",
|
||||
alias: "promotion",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const ReturnFulfillment: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["return_fulfillment", "return_fulfillments"],
|
||||
args: {
|
||||
entity: "LinkReturnFulfillment",
|
||||
},
|
||||
entity: "LinkReturnFulfillment",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "return_id", "fulfillment_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "id",
|
||||
foreignKey: "return_id",
|
||||
alias: "return",
|
||||
@@ -29,6 +28,7 @@ export const ReturnFulfillment: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "Fulfillment",
|
||||
primaryKey: "id",
|
||||
foreignKey: "fulfillment_id",
|
||||
alias: "fulfillments",
|
||||
|
||||
@@ -20,6 +20,7 @@ export const ProductSalesChannel: ModuleJoinerConfig = {
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "Product",
|
||||
primaryKey: "id",
|
||||
foreignKey: "product_id",
|
||||
alias: "product",
|
||||
@@ -29,6 +30,7 @@ export const ProductSalesChannel: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
entity: "SalesChannel",
|
||||
primaryKey: "id",
|
||||
foreignKey: "sales_channel_id",
|
||||
alias: "sales_channel",
|
||||
|
||||
@@ -20,15 +20,14 @@ export const ProductVariantInventoryItem: ModuleJoinerConfig = {
|
||||
"product_variant_inventory_item",
|
||||
"product_variant_inventory_items",
|
||||
],
|
||||
args: {
|
||||
entity: "LinkProductVariantInventoryItem",
|
||||
},
|
||||
entity: "LinkProductVariantInventoryItem",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "variant_id", "inventory_item_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "variant_id",
|
||||
alias: "variant",
|
||||
@@ -38,6 +37,7 @@ export const ProductVariantInventoryItem: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.INVENTORY,
|
||||
entity: "InventoryItem",
|
||||
primaryKey: "id",
|
||||
foreignKey: "inventory_item_id",
|
||||
alias: "inventory",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const ProductVariantPriceSet: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["product_variant_price_set", "product_variant_price_sets"],
|
||||
args: {
|
||||
entity: "LinkProductVariantPriceSet",
|
||||
},
|
||||
entity: "LinkProductVariantPriceSet",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "variant_id", "price_set_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "variant_id",
|
||||
alias: "variant",
|
||||
@@ -29,6 +28,7 @@ export const ProductVariantPriceSet: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PRICING,
|
||||
entity: "PriceSet",
|
||||
primaryKey: "id",
|
||||
foreignKey: "price_set_id",
|
||||
alias: "price_set",
|
||||
|
||||
@@ -20,6 +20,7 @@ export const PublishableApiKeySalesChannel: ModuleJoinerConfig = {
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.API_KEY,
|
||||
entity: "ApiKey",
|
||||
primaryKey: "id",
|
||||
foreignKey: "publishable_key_id",
|
||||
alias: "api_key",
|
||||
@@ -29,6 +30,7 @@ export const PublishableApiKeySalesChannel: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
entity: "SalesChannel",
|
||||
primaryKey: "id",
|
||||
foreignKey: "sales_channel_id",
|
||||
alias: "sales_channel",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const CartCustomer: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CART,
|
||||
relationship: {
|
||||
serviceName: Modules.CUSTOMER,
|
||||
entity: "Customer",
|
||||
primaryKey: "id",
|
||||
foreignKey: "customer_id",
|
||||
alias: "customer",
|
||||
@@ -21,6 +22,7 @@ export const CartCustomer: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CUSTOMER,
|
||||
relationship: {
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "customer_id",
|
||||
foreignKey: "id",
|
||||
alias: "carts",
|
||||
|
||||
@@ -21,6 +21,7 @@ export const CartProduct: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CART,
|
||||
relationship: {
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "items.variant_id",
|
||||
alias: "variant",
|
||||
@@ -33,6 +34,7 @@ export const CartProduct: ModuleJoinerConfig = {
|
||||
serviceName: Modules.PRODUCT,
|
||||
relationship: {
|
||||
serviceName: Modules.CART,
|
||||
entity: "LineItem",
|
||||
primaryKey: "variant_id",
|
||||
foreignKey: "id",
|
||||
alias: "cart_items",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const CartRegion: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CART,
|
||||
relationship: {
|
||||
serviceName: Modules.REGION,
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
alias: "region",
|
||||
@@ -21,6 +22,7 @@ export const CartRegion: ModuleJoinerConfig = {
|
||||
serviceName: Modules.REGION,
|
||||
relationship: {
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "carts",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const CartSalesChannel: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CART,
|
||||
relationship: {
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
entity: "SalesChannel",
|
||||
primaryKey: "id",
|
||||
foreignKey: "sales_channel_id",
|
||||
alias: "sales_channel",
|
||||
@@ -21,6 +22,7 @@ export const CartSalesChannel: ModuleJoinerConfig = {
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
relationship: {
|
||||
serviceName: Modules.CART,
|
||||
entity: "Cart",
|
||||
primaryKey: "sales_channel_id",
|
||||
foreignKey: "id",
|
||||
alias: "carts",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const InventoryLevelStockLocation: ModuleJoinerConfig = {
|
||||
serviceName: Modules.INVENTORY,
|
||||
relationship: {
|
||||
serviceName: Modules.STOCK_LOCATION,
|
||||
entity: "StockLocation",
|
||||
primaryKey: "id",
|
||||
foreignKey: "location_id",
|
||||
alias: "stock_locations",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const LineItemAdjustmentPromotion: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CART,
|
||||
relationship: {
|
||||
serviceName: Modules.PROMOTION,
|
||||
entity: "Promotion",
|
||||
primaryKey: "id",
|
||||
foreignKey: "promotion_id",
|
||||
alias: "promotion",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const OrderCustomer: ModuleJoinerConfig = {
|
||||
serviceName: Modules.ORDER,
|
||||
relationship: {
|
||||
serviceName: Modules.CUSTOMER,
|
||||
entity: "Customer",
|
||||
primaryKey: "id",
|
||||
foreignKey: "customer_id",
|
||||
alias: "customer",
|
||||
@@ -21,6 +22,7 @@ export const OrderCustomer: ModuleJoinerConfig = {
|
||||
serviceName: Modules.CUSTOMER,
|
||||
relationship: {
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "customer_id",
|
||||
foreignKey: "id",
|
||||
alias: "orders",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const OrderProduct: ModuleJoinerConfig = {
|
||||
serviceName: Modules.ORDER,
|
||||
relationship: {
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "Product",
|
||||
primaryKey: "id",
|
||||
foreignKey: "items.product_id",
|
||||
alias: "product",
|
||||
@@ -21,6 +22,7 @@ export const OrderProduct: ModuleJoinerConfig = {
|
||||
serviceName: Modules.ORDER,
|
||||
relationship: {
|
||||
serviceName: Modules.PRODUCT,
|
||||
entity: "ProductVariant",
|
||||
primaryKey: "id",
|
||||
foreignKey: "items.variant_id",
|
||||
alias: "variant",
|
||||
@@ -33,12 +35,13 @@ export const OrderProduct: ModuleJoinerConfig = {
|
||||
serviceName: Modules.PRODUCT,
|
||||
relationship: {
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "OrderLineItem",
|
||||
primaryKey: "variant_id",
|
||||
foreignKey: "id",
|
||||
alias: "order_items",
|
||||
isList: true,
|
||||
args: {
|
||||
methodSuffix: "LineItems",
|
||||
methodSuffix: "OrderLineItems",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -9,6 +9,7 @@ export const OrderRegion: ModuleJoinerConfig = {
|
||||
serviceName: Modules.ORDER,
|
||||
relationship: {
|
||||
serviceName: Modules.REGION,
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
alias: "region",
|
||||
@@ -21,6 +22,7 @@ export const OrderRegion: ModuleJoinerConfig = {
|
||||
serviceName: Modules.REGION,
|
||||
relationship: {
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "region_id",
|
||||
foreignKey: "id",
|
||||
alias: "orders",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const OrderSalesChannel: ModuleJoinerConfig = {
|
||||
serviceName: Modules.ORDER,
|
||||
relationship: {
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
entity: "SalesChannel",
|
||||
primaryKey: "id",
|
||||
foreignKey: "sales_channel_id",
|
||||
alias: "sales_channel",
|
||||
@@ -21,6 +22,7 @@ export const OrderSalesChannel: ModuleJoinerConfig = {
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
relationship: {
|
||||
serviceName: Modules.ORDER,
|
||||
entity: "Order",
|
||||
primaryKey: "sales_channel_id",
|
||||
foreignKey: "id",
|
||||
alias: "orders",
|
||||
|
||||
@@ -9,6 +9,7 @@ export const StoreCurrencies: ModuleJoinerConfig = {
|
||||
serviceName: Modules.STORE,
|
||||
relationship: {
|
||||
serviceName: Modules.CURRENCY,
|
||||
entity: "Currency",
|
||||
primaryKey: "code",
|
||||
foreignKey: "supported_currencies.currency_code",
|
||||
alias: "currency",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const RegionPaymentProvider: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["region_payment_provider", "region_payment_providers"],
|
||||
args: {
|
||||
entity: "LinkRegionPaymentProvider",
|
||||
},
|
||||
entity: "LinkRegionPaymentProvider",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "region_id", "payment_provider_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.REGION,
|
||||
entity: "Region",
|
||||
primaryKey: "id",
|
||||
foreignKey: "region_id",
|
||||
alias: "region",
|
||||
@@ -29,6 +28,7 @@ export const RegionPaymentProvider: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PAYMENT,
|
||||
entity: "PaymentProvider",
|
||||
primaryKey: "id",
|
||||
foreignKey: "payment_provider_id",
|
||||
alias: "payment_provider",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const SalesChannelLocation: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["sales_channel_location", "sales_channel_locations"],
|
||||
args: {
|
||||
entity: "LinkSalesChannelLocation",
|
||||
},
|
||||
entity: "LinkSalesChannelLocation",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "sales_channel_id", "stock_location_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.SALES_CHANNEL,
|
||||
entity: "SalesChannel",
|
||||
primaryKey: "id",
|
||||
foreignKey: "sales_channel_id",
|
||||
alias: "sales_channel",
|
||||
@@ -29,6 +28,7 @@ export const SalesChannelLocation: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.STOCK_LOCATION,
|
||||
entity: "StockLocation",
|
||||
primaryKey: "id",
|
||||
foreignKey: "stock_location_id",
|
||||
alias: "location",
|
||||
|
||||
@@ -11,15 +11,14 @@ export const ShippingOptionPriceSet: ModuleJoinerConfig = {
|
||||
alias: [
|
||||
{
|
||||
name: ["shipping_option_price_set", "shipping_option_price_sets"],
|
||||
args: {
|
||||
entity: "LinkShippingOptionPriceSet",
|
||||
},
|
||||
entity: "LinkShippingOptionPriceSet",
|
||||
},
|
||||
],
|
||||
primaryKeys: ["id", "shipping_option_id", "price_set_id"],
|
||||
relationships: [
|
||||
{
|
||||
serviceName: Modules.FULFILLMENT,
|
||||
entity: "ShippingOption",
|
||||
primaryKey: "id",
|
||||
foreignKey: "shipping_option_id",
|
||||
alias: "shipping_option",
|
||||
@@ -29,6 +28,7 @@ export const ShippingOptionPriceSet: ModuleJoinerConfig = {
|
||||
},
|
||||
{
|
||||
serviceName: Modules.PRICING,
|
||||
entity: "PriceSet",
|
||||
primaryKey: "id",
|
||||
foreignKey: "price_set_id",
|
||||
alias: "price_set",
|
||||
|
||||
@@ -139,7 +139,7 @@ export const initialize = async (
|
||||
for (const alias of definition.alias) {
|
||||
alias.args ??= {}
|
||||
|
||||
alias.args.entity = toPascalCase(
|
||||
alias.entity = toPascalCase(
|
||||
"Link_" +
|
||||
(definition.databaseConfig?.tableName ??
|
||||
composeTableName(
|
||||
|
||||
Reference in New Issue
Block a user