|
1
|
import { defineJoinerConfig, Modules } from "@medusajs/framework/utils" |
|
2
|
import { |
|
3
|
AccountHolder, |
|
4
|
Payment, |
|
5
|
PaymentCollection, |
|
6
|
PaymentProvider, |
|
7
|
RefundReason, |
|
8
|
} from "@models" |
|
9
|
|
|
10
|
export const joinerConfig = defineJoinerConfig(Modules.PAYMENT, { |
|
11
|
linkableKeys: { |
|
12
|
payment_id: Payment.name, |
|
13
|
payment_collection_id: PaymentCollection.name, |
|
14
|
payment_provider_id: PaymentProvider.name, |
|
15
|
refund_reason_id: RefundReason.name, |
|
16
|
account_holder_id: AccountHolder.name, |
|
17
|
}, |
|
18
|
alias: [ |
|
19
|
{ |
|
20
|
name: ["payment_method", "payment_methods"], |
|
21
|
entity: "PaymentMethod", |
|
22
|
args: { |
|
23
|
methodSuffix: "PaymentMethods", |
|
24
|
}, |
|
25
|
}, |
|
26
|
], |
|
27
|
}) |