2026-07-11 00:07:48 +03:30
|
|
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
2026-07-11 03:12:56 +03:30
|
|
|
import { IsISO8601, IsInt, IsOptional, Max, Min } from 'class-validator';
|
|
|
|
|
import { Type } from 'class-transformer';
|
2026-07-11 00:07:48 +03:30
|
|
|
|
|
|
|
|
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;
|
2026-07-11 03:12:56 +03:30
|
|
|
|
|
|
|
|
@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;
|
2026-07-11 00:07:48 +03:30
|
|
|
}
|