|
|
@@ -1,16 +1,22 @@
|
|
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
|
+import { Type } from 'class-transformer';
|
|
|
+import { IsInt } from 'class-validator';
|
|
|
|
|
|
export class BaseRangeQueryDto {
|
|
|
@ApiProperty({
|
|
|
description: 'UTC epoch seconds (inclusive)',
|
|
|
example: 1767168000,
|
|
|
})
|
|
|
+ @Type(() => Number)
|
|
|
+ @IsInt()
|
|
|
fromSec!: number;
|
|
|
|
|
|
@ApiProperty({
|
|
|
description: 'UTC epoch seconds (exclusive)',
|
|
|
example: 1767175200,
|
|
|
})
|
|
|
+ @Type(() => Number)
|
|
|
+ @IsInt()
|
|
|
toSec!: number;
|
|
|
|
|
|
@ApiPropertyOptional({
|