import { Logger, Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { ContractsService } from './contracts.service'; import { ContractsController } from './contracts.controller'; import { Contract } from './entities/contract.entity'; @Module({ imports: [TypeOrmModule.forFeature([Contract])], controllers: [ContractsController], providers: [Logger, ContractsService], // If you want to use the repository outside of the module // which imports TypeOrmModule.forFeature, you'll need to re-export the providers generated by it. // exports: [TypeOrmModule], }) export class ContractsModule {}