import { Module } from '@nestjs/common'; import { MongooseModule } from '@nestjs/mongoose'; import { ResidentSeed } from './resident.seed'; import { ResidentService } from './resident.service'; import { Resident, ResidentSchema } from './schemas/Resident.schema'; import { ResidentAddress, ResidentAddressSchema, } from './schemas/ResidentAddress.schema'; @Module({ imports: [ MongooseModule.forFeature([ { name: ResidentAddress.name, schema: ResidentAddressSchema, }, { name: Resident.name, schema: ResidentSchema, }, ]), ], providers: [ResidentService, ResidentSeed], exports: [ResidentService], }) export class ResidentModule {}