mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
refactor(nestjs): export module
This commit is contained in:
@@ -17,6 +17,7 @@ import { RegisterTenancyModel } from '../Tenancy/TenancyModels/Tenancy.module';
|
||||
import { BankAccount } from '../BankingTransactions/models/BankAccount';
|
||||
import { GetAccountsService } from './GetAccounts.service';
|
||||
import { DynamicListModule } from '../DynamicListing/DynamicList.module';
|
||||
import { AccountsExportable } from './AccountsExportable.service';
|
||||
// import { GetAccountsService } from './GetAccounts.service';
|
||||
|
||||
const models = [RegisterTenancyModel(BankAccount)];
|
||||
@@ -38,6 +39,7 @@ const models = [RegisterTenancyModel(BankAccount)];
|
||||
GetAccountTypesService,
|
||||
GetAccountTransactionsService,
|
||||
GetAccountsService,
|
||||
AccountsExportable
|
||||
],
|
||||
exports: [AccountRepository, CreateAccountService, ...models],
|
||||
})
|
||||
|
||||
@@ -2,8 +2,16 @@ import { AccountsApplication } from './AccountsApplication.service';
|
||||
import { Exportable } from '../Export/Exportable';
|
||||
import { EXPORT_SIZE_LIMIT } from '../Export/constants';
|
||||
import { IAccountsFilter, IAccountsStructureType } from './Accounts.types';
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ExportableService } from '../Export/decorators/ExportableModel.decorator';
|
||||
import { Account } from './models/Account.model';
|
||||
|
||||
@Injectable()
|
||||
@ExportableService({ name: Account.name })
|
||||
export class AccountsExportable extends Exportable {
|
||||
/**
|
||||
* @param {AccountsApplication} accountsApplication
|
||||
*/
|
||||
constructor(private readonly accountsApplication: AccountsApplication) {
|
||||
super();
|
||||
}
|
||||
|
||||
@@ -15,12 +15,13 @@ import { Model } from 'objection';
|
||||
import { PlaidItem } from '@/modules/BankingPlaid/models/PlaidItem';
|
||||
import { TenantBaseModel } from '@/modules/System/models/TenantBaseModel';
|
||||
import { flatToNestedArray } from '@/utils/flat-to-nested-array';
|
||||
import { ExportableModel } from '../../Export/decorators/ExportableModel.decorator';
|
||||
// import AccountSettings from './Account.Settings';
|
||||
// import { DEFAULT_VIEWS } from '@/modules/Accounts/constants';
|
||||
// import { buildFilterQuery, buildSortColumnQuery } from '@/lib/ViewRolesBuilder';
|
||||
// import { flatToNestedArray } from 'utils';
|
||||
|
||||
|
||||
@ExportableModel()
|
||||
export class Account extends TenantBaseModel {
|
||||
public name!: string;
|
||||
public slug!: string;
|
||||
|
||||
Reference in New Issue
Block a user