import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { AuditModule } from '../audit/audit.module';
import { SuperAdminCase, SuperAdminCaseSchema } from '../superadmin/schemas/superadmin-case.schema';
import { UsersModule } from '../users/users.module';
import { MarketplaceController } from './marketplace.controller';
import { MarketplaceRepository } from './marketplace.repository';
import { MarketplaceService } from './marketplace.service';
import { Instrument, InstrumentSchema } from './schemas/instrument.schema';
import { RepairShop, RepairShopSchema } from './schemas/repair-shop.schema';

@Module({
  imports: [
    AuditModule,
    UsersModule,
    MongooseModule.forFeature([
      { name: Instrument.name, schema: InstrumentSchema },
      { name: RepairShop.name, schema: RepairShopSchema },
      { name: SuperAdminCase.name, schema: SuperAdminCaseSchema },
    ]),
  ],
  controllers: [MarketplaceController],
  providers: [MarketplaceService, MarketplaceRepository],
  exports: [MarketplaceService],
})
export class MarketplaceModule {}
