import { ApiPropertyOptional } from '@nestjs/swagger'; import { IsISO8601, IsInt, IsOptional, Max, Min } from 'class-validator'; import { Type } from 'class-transformer'; export class TodaySummaryQueryDto { @ApiPropertyOptional({ description: 'Start of the local day range (ISO 8601). Defaults to UTC midnight today.', example: '2026-07-10T00:00:00.000Z', }) @IsOptional() @IsISO8601() from?: string; @ApiPropertyOptional({ description: 'End of the local day range (ISO 8601, exclusive). Defaults to next UTC midnight.', example: '2026-07-11T00:00:00.000Z', }) @IsOptional() @IsISO8601() to?: string; @ApiPropertyOptional({ description: 'Client UTC offset in minutes (same sign as Date.getTimezoneOffset negated). Used for hourly buckets.', example: 210, }) @IsOptional() @Type(() => Number) @IsInt() @Min(-840) @Max(840) utcOffsetMinutes?: number; }