feat: Link transations with payment methods

This commit is contained in:
Ahmed Bouhuolia
2024-09-15 19:42:43 +02:00
parent 542e61dbfc
commit 430cf19533
21 changed files with 581 additions and 8 deletions

View File

@@ -0,0 +1,33 @@
import { Model, mixin } from 'objection';
import TenantModel from 'models/TenantModel';
export class TransactionPaymentService extends TenantModel {
/**
* Table name
*/
static get tableName() {
return 'transactions_payment_services';
}
static get jsonSchema() {
return {
type: 'object',
required: ['service', 'enable'],
properties: {
id: { type: 'integer' },
reference_id: { type: 'integer' },
reference_type: { type: 'string' },
service: { type: 'string' },
enable: { type: 'boolean' },
options: { type: 'object' },
},
};
}
/**
* Relationship mapping.
*/
static get relationMappings() {
return {};
}
}