import { ApiProperty } from '@nestjs/swagger';
import { DashboardPeriod } from '../../../domain/value-objects';

/**
 * 趋势数据点
 */
export class TrendDataPointDto {
  @ApiProperty({ description: '日期', example: '03-19' })
  date: string;

  @ApiProperty({ description: '数值', example: 150 })
  value: number;
}

/**
 * 趋势数据
 */
export class DashboardTrendDataDto {
  @ApiProperty({ enum: DashboardPeriod, description: '时间周期' })
  period: DashboardPeriod;

  @ApiProperty({ type: [TrendDataPointDto], description: '趋势数据点' })
  data: TrendDataPointDto[];
}

/**
 * 仪表板趋势响应
 */
export class DashboardTrendResponseDto {
  @ApiProperty({ type: DashboardTrendDataDto, description: '趋势数据' })
  trend: DashboardTrendDataDto;
}
