Skip to content
Snippets Groups Projects
structures.module.ts 1.2 KiB
Newer Older
  • Learn to ignore specific revisions
  • import { HttpModule, Module } from '@nestjs/common';
    
    import { MongooseModule } from '@nestjs/mongoose';
    
    import { MailerModule } from '../mailer/mailer.module';
    
    import { UsersModule } from '../users/users.module';
    
    import { Structure, StructureSchema } from './schemas/structure.schema';
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    import { StructuresController } from './structures.controller';
    
    import { StructuresService } from './services/structures.service';
    import { ApticStructuresService } from './services/aptic-structures.service';
    
    import { StructureTypeController } from './structure-type/structure-type.controller';
    import { StructureTypeService } from './structure-type/structure-type.service';
    import { StructureType, StructureTypeSchema } from './structure-type/structure-type.schema';
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    
    @Module({
    
        MongooseModule.forFeature([
          { name: Structure.name, schema: StructureSchema },
          { name: StructureType.name, schema: StructureTypeSchema },
        ]),
    
        HttpModule,
        MailerModule,
        UsersModule,
      ],
    
      controllers: [StructuresController, StructureTypeController],
      exports: [StructuresService, StructureTypeService],
      providers: [StructuresService, StructureTypeService, ApticStructuresService],
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    })
    export class StructuresModule {}