feat: inactive associated Stripe payment link on invoice deleting

This commit is contained in:
Ahmed Bouhuolia
2024-09-18 23:41:59 +02:00
parent 4665f529e6
commit d2cd32a735
11 changed files with 214 additions and 38 deletions

View File

@@ -30,6 +30,17 @@ export class TransactionPaymentServiceEntry extends TenantModel {
* Relationship mapping.
*/
static get relationMappings() {
return {};
const { PaymentIntegration } = require('./PaymentIntegration');
return {
paymentIntegration: {
relation: TenantModel.BelongsToOneRelation,
modelClass: PaymentIntegration,
join: {
from: 'transactions_payment_methods.paymentIntegrationId',
to: 'payment_integrations.id',
},
},
};
}
}