feat: link and unlink document to resource model

This commit is contained in:
Ahmed Bouhuolia
2024-05-24 19:50:06 +02:00
parent c8f31f33be
commit 8f904fae3a
14 changed files with 347 additions and 20 deletions

View File

@@ -60,9 +60,10 @@ import Time from 'models/Time';
import Task from 'models/Task';
import TaxRate from 'models/TaxRate';
import TaxRateTransaction from 'models/TaxRateTransaction';
import Attachment from 'models/Attachment';
import PlaidItem from 'models/PlaidItem';
import UncategorizedCashflowTransaction from 'models/UncategorizedCashflowTransaction';
import Document from '@/models/Document';
import DocumentLink from '@/models/DocumentLink';
export default (knex) => {
const models = {
@@ -126,9 +127,10 @@ export default (knex) => {
Task,
TaxRate,
TaxRateTransaction,
Attachment,
Document,
DocumentLink,
PlaidItem,
UncategorizedCashflowTransaction
UncategorizedCashflowTransaction,
};
return mapValues(models, (model) => model.bindKnex(knex));
};