import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

import { FilesModule } from '../files/files.module';
import { WarehouseActivityLog } from './entities/warehouse-activity-log.entity';
import { WarehouseAllocationRule } from './entities/warehouse-allocation-rule.entity';
import { WarehouseFeeInvoice } from './entities/warehouse-fee-invoice.entity';
import { WarehouseFeeInvoiceItem } from './entities/warehouse-fee-invoice-item.entity';
import { WarehouseFeeRule } from './entities/warehouse-fee-rule.entity';
import { WarehouseInspectionReport } from './entities/warehouse-inspection-report.entity';
import { WarehouseInventory } from './entities/warehouse-inventory.entity';
import { WarehouseInventoryMovement } from './entities/warehouse-inventory-movement.entity';
import { WarehouseLoading } from './entities/warehouse-loading.entity';
import { WarehouseYard } from './entities/warehouse-yard.entity';
import { WarehouseZone } from './entities/warehouse-zone.entity';
import { Warehouse } from './entities/warehouse.entity';
import { SchedulingReadFacade } from './scheduling-read.facade';
import { WarehouseActivityLogRepository } from './warehouse-activity-log.repository';
import { WarehouseActivityLogService } from './warehouse-activity-log.service';
import { WarehouseDashboardService } from './warehouse-dashboard.service';
import { WarehouseInspectionController } from './warehouse-inspection.controller';
import { WarehouseInspectionRepository } from './warehouse-inspection.repository';
import { WarehouseInspectionService } from './warehouse-inspection.service';
import { WarehouseInventoryController } from './warehouse-inventory.controller';
import { WarehouseInventoryMovementRepository } from './warehouse-inventory-movement.repository';
import { WarehouseInventoryRepository } from './warehouse-inventory.repository';
import { WarehouseInventoryService } from './warehouse-inventory.service';
import { WarehouseLoadingRepository } from './warehouse-loading.repository';
import { WarehouseLoadingsController } from './warehouse-loadings.controller';
import { WarehouseAllocationRuleRepository } from './warehouse-allocation-rule.repository';
import { WarehouseAllocationService } from './warehouse-allocation.service';
import { WarehouseFeeRuleRepository } from './warehouse-fee-rule.repository';
import { WarehouseFeeService } from './warehouse-fee.service';
import { WarehouseFeeInvoiceItemRepository } from './warehouse-fee-invoice-item.repository';
import { WarehouseFeeInvoiceRepository } from './warehouse-fee-invoice.repository';
import { WarehouseInvoiceController } from './warehouse-invoice.controller';
import { WarehouseInvoiceService } from './warehouse-invoice.service';
import { WarehouseRulesController } from './warehouse-rules.controller';
import { WarehouseSchedulingAdapterService } from './warehouse-scheduling-adapter.service';
import { WarehouseYardsController } from './warehouse-yards.controller';
import { WarehouseYardsRepository } from './warehouse-yards.repository';
import { WarehouseYardsService } from './warehouse-yards.service';
import { WarehouseZonesController } from './warehouse-zones.controller';
import { WarehouseZonesRepository } from './warehouse-zones.repository';
import { WarehouseZonesService } from './warehouse-zones.service';
import { WarehousesController } from './warehouses.controller';
import { WarehousesRepository } from './warehouses.repository';
import { WarehousesService } from './warehouses.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Warehouse,
      WarehouseYard,
      WarehouseZone,
      WarehouseInventory,
      WarehouseInventoryMovement,
      WarehouseActivityLog,
      WarehouseLoading,
      WarehouseInspectionReport,
      WarehouseAllocationRule,
      WarehouseFeeRule,
      WarehouseFeeInvoice,
      WarehouseFeeInvoiceItem,
    ]),
    FilesModule,
  ],
  controllers: [
    WarehousesController,
    WarehouseYardsController,
    WarehouseZonesController,
    WarehouseInventoryController,
    WarehouseLoadingsController,
    WarehouseInspectionController,
    WarehouseRulesController,
    WarehouseInvoiceController,
  ],
  providers: [
    WarehousesRepository,
    WarehouseYardsRepository,
    WarehouseZonesRepository,
    WarehouseInventoryRepository,
    WarehouseInventoryMovementRepository,
    WarehouseActivityLogRepository,
    WarehouseLoadingRepository,
    WarehouseInspectionRepository,
    WarehouseAllocationRuleRepository,
    WarehouseFeeRuleRepository,
    WarehouseFeeInvoiceRepository,
    WarehouseFeeInvoiceItemRepository,
    WarehousesService,
    WarehouseYardsService,
    WarehouseZonesService,
    WarehouseInventoryService,
    WarehouseActivityLogService,
    WarehouseDashboardService,
    WarehouseInspectionService,
    WarehouseAllocationService,
    WarehouseFeeService,
    WarehouseInvoiceService,
    WarehouseSchedulingAdapterService,
    SchedulingReadFacade,
  ],
  exports: [
    WarehousesService,
    WarehouseYardsService,
    WarehouseZonesService,
    WarehouseInventoryService,
    WarehouseAllocationService,
    WarehouseFeeService,
    WarehouseSchedulingAdapterService,
  ],
})
export class WarehousesModule {}
