import { Global, Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { OperationsStandard } from './entities/operations-standard.entity'; import { OperationsTarget } from './entities/operations-target.entity'; import { OperationsStandardsController } from './operations-standards.controller'; import { OperationsStandardsService } from './operations-standards.service'; import { OperationsTargetsController } from './operations-targets.controller'; import { OperationsTargetsService } from './operations-targets.service'; /** * Reference data behind the operations reports: the railway's operating * standards (one settings row) and the planned targets the reports compare * actuals against. * * Global because the reports module reads the standards row on every run and * has no other reason to import this. */ @Global() @Module({ imports: [TypeOrmModule.forFeature([OperationsStandard, OperationsTarget])], controllers: [OperationsStandardsController, OperationsTargetsController], providers: [OperationsStandardsService, OperationsTargetsService], exports: [OperationsStandardsService, OperationsTargetsService], }) export class OperationsReportingModule {}