import { ApiProperty } from '@nestjs/swagger';

class HealthDependencyDto {
  @ApiProperty({ example: 'up' })
  status!: 'up' | 'down';
}

class StorageDependencyDto extends HealthDependencyDto {
  @ApiProperty({ example: '/app/runtime/storage' })
  root!: string;
}

export class HealthResponseDto {
  @ApiProperty({ example: 'velody-backend' })
  service!: string;

  @ApiProperty({ example: '0.1.0' })
  version!: string;

  @ApiProperty({ type: HealthDependencyDto })
  database!: HealthDependencyDto;

  @ApiProperty({ type: StorageDependencyDto })
  storage!: StorageDependencyDto;

  @ApiProperty({ example: '2026-05-24T20:00:00.000Z' })
  serverTime!: string;
}
