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

export class DauDayItemDto {
  @ApiProperty({ description: '日期', example: '2025-01-15' })
  day: string;

  @ApiProperty({ description: 'DAU', example: 5678 })
  dauCount: number;

  @ApiPropertyOptional({ description: '按省份统计' })
  byProvince?: Record<string, number>;

  @ApiPropertyOptional({ description: '按城市统计' })
  byCity?: Record<string, number>;
}

export class DauStatsResponseDto {
  @ApiProperty({ type: [DauDayItemDto], description: 'DAU数据' })
  data: DauDayItemDto[];

  @ApiProperty({ description: '记录数', example: 15 })
  total: number;
}
