import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { FeesController } from './fees.controller';
import { FeesService } from './fees.service';
import { FeeStructure, FeeStructureSchema } from './schemas/fee-structure.schema';
import { FeeAssignment, FeeAssignmentSchema } from './schemas/fee-assignment.schema';
import { FeePayment, FeePaymentSchema } from './schemas/fee-payment.schema';
import { Student, StudentSchema } from '../students/schemas/student.schema';
import { AcademicYear, AcademicYearSchema } from '../academic-year/academic-year.schema';
import { InvoicesModule } from '../invoices/invoices.module';

@Module({
    imports: [
        MongooseModule.forFeature([
            { name: FeeStructure.name, schema: FeeStructureSchema },
            { name: FeeAssignment.name, schema: FeeAssignmentSchema },
            { name: FeePayment.name, schema: FeePaymentSchema },
            { name: Student.name, schema: StudentSchema },
            { name: AcademicYear.name, schema: AcademicYearSchema },
        ]),
        InvoicesModule,
    ],
    controllers: [FeesController],
    providers: [FeesService],
    exports: [FeesService],
})
export class FeesModule {}
