Files
bigcapital/packages/server/src/models/PaymentIntegration.ts
2024-09-22 12:52:59 +02:00

29 lines
706 B
TypeScript

import { Model } from 'objection';
import TenantModel from 'models/TenantModel';
export class PaymentIntegration extends TenantModel {
static get tableName() {
return 'payment_integrations';
}
static get idColumn() {
return 'id';
}
static get jsonSchema() {
return {
type: 'object',
required: ['name', 'service', 'active'],
properties: {
id: { type: 'integer' },
service: { type: 'string' },
active: { type: 'boolean' },
accountId: { type: 'string' },
options: { type: 'object' },
createdAt: { type: 'string', format: 'date-time' },
updatedAt: { type: 'string', format: 'date-time' },
},
};
}
}