import { IsString, IsDateString, IsOptional } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class QueryOnlineHistoryDto {
  @ApiProperty({ example: '2026-03-01T00:00:00Z' })
  @IsDateString()
  startTime: string;

  @ApiProperty({ example: '2026-03-07T23:59:59Z' })
  @IsDateString()
  endTime: string;

  @ApiPropertyOptional({ enum: ['1m', '5m', '1h'], default: '5m' })
  @IsOptional()
  @IsString()
  interval?: '1m' | '5m' | '1h';
}
