import { Module } from '@nestjs/common'
import { MongooseModule } from '@nestjs/mongoose'
import { Invoice, InvoiceSchema, TimeEntry, TimeEntrySchema, ClientFolder, ClientFolderSchema, Expense, ExpenseSchema } from '../common/schemas'
import { InvoicesService } from './invoices.service'
import { InvoicesController } from './invoices.controller'
import { InvoicePdfService } from './invoice-pdf.service'

@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Invoice.name, schema: InvoiceSchema },
      { name: TimeEntry.name, schema: TimeEntrySchema },
      { name: ClientFolder.name, schema: ClientFolderSchema },
      { name: Expense.name, schema: ExpenseSchema },
    ]),
  ],
  controllers: [InvoicesController],
  providers: [InvoicesService, InvoicePdfService],
  exports: [InvoicesService],
})
export class InvoicesModule {}
