import { Controller, Get } from '@nestjs/common';
import { SystemService } from './system.service';
import { SystemHealthResponse } from './dto/system-health.dto';
import { TestSummaryDto } from './dto/test-summary.dto';
import { Public } from '../common/decorators/public.decorator';

@Controller('system')
export class SystemController {
  constructor(private readonly systemService: SystemService) {}

  @Public()
  @Get('health')
  async getHealth(): Promise<SystemHealthResponse> {
    return this.systemService.getHealth();
  }

  /**
   * 전체 검사 집계 조회
   * 농가별/개체별 유전체, 유전자, 번식능력 검사 현황
   */
  @Public()
  @Get('test-summary')
  async getTestSummary(): Promise<TestSummaryDto> {
    return this.systemService.getTestSummary();
  }
}
