All files / src/domains/inventory inventory.module.ts

0% Statements 0/24
100% Branches 0/0
100% Functions 0/0
0% Lines 0/22

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109                                                                                                                                                                                                                         
import { Module, Global } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { InventoryController } from './controllers/inventory.controller';
import { InventoryService } from './services/inventory.service';
import { ConfigurationService } from './configuration/services/configuration.service';
import { ItemService } from './items/services/item.service';
import { WarehouseService } from './warehouses/services/warehouse.service';
import { LedgerService } from './stock-ledger/services/ledger.service';
import { BatchSerialService } from './batches/services/batch-serial.service';
import { ReservationService } from './reservations/services/reservation.service';
import { MovementService } from './transfers/services/movement.service';
import { AdjustmentService } from './adjustments/services/adjustment.service';
import { CountService } from './counts/services/count.service';
import { ReplenishmentService } from './replenishment/services/replenishment.service';
import { ValuationService } from './valuation/services/valuation.service';
import { TraceabilityService } from './traceability/services/traceability.service';
import { ReceiptIntegrationService } from './receipts/services/receipt-integration.service';
 
import {
  InventoryConfiguration,
  InventoryConfigurationSchema,
  InventoryItem,
  InventoryItemSchema,
  Warehouse,
  WarehouseSchema,
  StorageLocation,
  StorageLocationSchema,
  StockLedgerEntry,
  StockLedgerEntrySchema,
  StockBalance,
  StockBalanceSchema,
  InventoryBatch,
  InventoryBatchSchema,
  InventorySerial,
  InventorySerialSchema,
  StockReservation,
  StockReservationSchema,
  StockTransfer,
  StockTransferSchema,
  StockAdjustment,
  StockAdjustmentSchema,
  InventoryCountSession,
  InventoryCountSessionSchema,
  InventoryCostLayer,
  InventoryCostLayerSchema,
} from './schemas/inventory.schema';
 
import { EventBusModule } from '../../platform/events/event-bus.module';
import { AuditLogModule } from '../../platform/audit/audit-log.module';
import { PermissionModule } from '../../platform/permissions/permission.module';
 
@Global()
@Module({
  imports: [
    MongooseModule.forFeature([
      { name: InventoryConfiguration.name, schema: InventoryConfigurationSchema },
      { name: InventoryItem.name, schema: InventoryItemSchema },
      { name: Warehouse.name, schema: WarehouseSchema },
      { name: StorageLocation.name, schema: StorageLocationSchema },
      { name: StockLedgerEntry.name, schema: StockLedgerEntrySchema },
      { name: StockBalance.name, schema: StockBalanceSchema },
      { name: InventoryBatch.name, schema: InventoryBatchSchema },
      { name: InventorySerial.name, schema: InventorySerialSchema },
      { name: StockReservation.name, schema: StockReservationSchema },
      { name: StockTransfer.name, schema: StockTransferSchema },
      { name: StockAdjustment.name, schema: StockAdjustmentSchema },
      { name: InventoryCountSession.name, schema: InventoryCountSessionSchema },
      { name: InventoryCostLayer.name, schema: InventoryCostLayerSchema },
    ]),
    EventBusModule,
    AuditLogModule,
    PermissionModule,
  ],
  controllers: [InventoryController],
  providers: [
    InventoryService,
    ConfigurationService,
    ItemService,
    WarehouseService,
    LedgerService,
    BatchSerialService,
    ReservationService,
    MovementService,
    AdjustmentService,
    CountService,
    ReplenishmentService,
    ValuationService,
    TraceabilityService,
    ReceiptIntegrationService,
  ],
  exports: [
    InventoryService,
    ConfigurationService,
    ItemService,
    WarehouseService,
    LedgerService,
    BatchSerialService,
    ReservationService,
    MovementService,
    AdjustmentService,
    CountService,
    ReplenishmentService,
    ValuationService,
    TraceabilityService,
    ReceiptIntegrationService,
  ],
})
export class InventoryModule {}