import { IsString, IsOptional, IsEnum, IsArray } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { IndicatorType } from '../interfaces/indicator.interface';

export class GetIndicatorsDto {
  @ApiProperty({ description: '周期', enum: ['1m', '5m', '15m', '30m', '1h', '1d', '1w'] })
  @IsString()
  @IsEnum(['1m', '5m', '15m', '30m', '1h', '1d', '1w'])
  period: string;

  @ApiProperty({ 
    description: '指标列表', 
    isArray: true,
    enum: ['macd', 'rsi', 'bollinger', 'kdj', 'sar', 'obv', 'dmi', 'cci', 'wr', 'ma5', 'ma10', 'ma20', 'ma60'],
  })
  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  indicators?: IndicatorType[];
}
