import { Global, Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { TypeOrmModule } from '@nestjs/typeorm'; import { CONNECTION_NAME } from 'src/core/strings/constants/base.constants'; import { SalesPriceFormulaDataService } from './data/services/sales-price-formula-data.service'; import { SalesPriceFormulaReadService } from './data/services/sales-price-formula-read.service'; import { SalesPriceFormulaReadController } from './infrastructure/sales-price-formula-read.controller'; import { SalesPriceFormulaReadOrchestrator } from './domain/usecases/sales-price-formula-read.orchestrator'; import { SalesPriceFormulaDataController } from './infrastructure/sales-price-formula-data.controller'; import { SalesPriceFormulaDataOrchestrator } from './domain/usecases/sales-price-formula-data.orchestrator'; import { CqrsModule } from '@nestjs/cqrs'; import { UpdateSalesPriceFormulaManager } from './domain/usecases/managers/update-sales-price-formula.manager'; import { DetailSalesPriceFormulaManager } from './domain/usecases/managers/detail-sales-price-formula.manager'; import { SalesPriceFormulaModel } from './data/models/sales-price-formula.model'; import { TaxDataService } from '../tax/data/services/tax-data.service'; import { TaxModel } from '../tax/data/models/tax.model'; import { ItemModel } from 'src/modules/item-related/item/data/models/item.model'; @Global() @Module({ imports: [ ConfigModule.forRoot(), TypeOrmModule.forFeature( [SalesPriceFormulaModel, TaxModel, ItemModel], CONNECTION_NAME.DEFAULT, ), CqrsModule, ], controllers: [ SalesPriceFormulaDataController, SalesPriceFormulaReadController, ], providers: [ DetailSalesPriceFormulaManager, UpdateSalesPriceFormulaManager, TaxDataService, SalesPriceFormulaDataService, SalesPriceFormulaReadService, SalesPriceFormulaDataOrchestrator, SalesPriceFormulaReadOrchestrator, ], exports: [SalesPriceFormulaDataService, SalesPriceFormulaReadService], }) export class SalesPriceFormulaModule {}