mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: Link transations with payment methods
This commit is contained in:
33
packages/server/src/models/TransactionPaymentService.ts
Normal file
33
packages/server/src/models/TransactionPaymentService.ts
Normal 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 {};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user