import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { PalmOilController } from './palm-oil.controller';
import { PalmOilService } from './palm-oil.service';
import { ScannerProvider } from './providers/scanner.provider';
import { VisionGateway } from './vision.gateway';
import { History } from './entities/history.entity';

@Module({
  imports: [TypeOrmModule.forFeature([History])],
  controllers: [PalmOilController],
  // Lego 13 — VisionGateway replaces the REST analyze endpoint
  providers: [PalmOilService, ScannerProvider, VisionGateway],
  exports: [PalmOilService, ScannerProvider],
})
export class PalmOilModule {}
