bex-twn/src/resident/resident.module.ts

28 lines
709 B
TypeScript
Raw Permalink Normal View History

2022-12-06 12:26:39 +00:00
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 {}