Files
bigcapital/packages/server/src/services/FinancialStatements/FinancialSchema.ts
2023-02-03 11:57:50 +02:00

25 lines
520 B
TypeScript

import * as R from 'ramda';
import { FinancialSheetStructure } from './FinancialSheetStructure';
export const FinancialSchema = (Base) =>
class extends R.compose(FinancialSheetStructure)(Base) {
/**
*
* @returns
*/
getSchema() {
return [];
}
/**
*
* @param {string|number} id
* @returns
*/
getSchemaNodeById = (id: string | number) => {
const schema = this.getSchema();
return this.findNodeDeep(schema, (node) => node.id === id);
};
};