import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiResponse, ApiTags } from '@nestjs/swagger';

@ApiTags('Health')
@Controller({ path: '', version: '1' })
export class AppController {
  @Get()
  @ApiOperation({
    summary: 'API health check',
    description: 'Returns a simple status payload confirming that the API process is running.'
  })
  @ApiResponse({
    status: 200,
    description: 'API is healthy.',
    schema: {
      example: {
        message: 'Smart Estate API is running',
        version: '1',
        status: 'ok'
      }
    }
  })
  getStatus() {
    return {
      message: 'Smart Estate API is running',
      version: '1',
      status: 'ok'
    };
  }
}
