refactor(nestjs): export module

This commit is contained in:
Ahmed Bouhuolia
2025-04-10 23:34:42 +02:00
parent ab49113d5a
commit c953c48c39
23 changed files with 176 additions and 68 deletions

View File

@@ -27,6 +27,7 @@ import { GetBillsService } from './queries/GetBills.service';
import { DynamicListModule } from '../DynamicListing/DynamicList.module';
import { InventoryCostModule } from '../InventoryCost/InventoryCost.module';
import { BillsExportable } from './commands/BillsExportable';
import { BillsImportable } from './commands/BillsImportable';
@Module({
imports: [
@@ -58,8 +59,10 @@ import { BillsExportable } from './commands/BillsExportable';
BillGLEntriesSubscriber,
BillInventoryTransactions,
BillWriteInventoryTransactionsSubscriber,
BillsExportable
BillsExportable,
BillsImportable
],
controllers: [BillsController],
exports: [BillsExportable, BillsImportable],
})
export class BillsModule {}

View File

@@ -4,8 +4,11 @@ import { Injectable } from '@nestjs/common';
import { Exportable } from '@/modules/Export/Exportable';
import { IBillsFilter } from '../Bills.types';
import { EXPORT_SIZE_LIMIT } from '@/modules/Export/constants';
import { ExportableService } from '@/modules/Export/decorators/ExportableModel.decorator';
import { Bill } from '../models/Bill';
@Injectable()
@ExportableService({ name: Bill.name })
export class BillsExportable extends Exportable {
constructor(private readonly billsApplication: BillsApplication) {
super();