import { ApiPropertyOptional } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsIn, IsInt, IsOptional, Min } from "class-validator"; import { RunStatus } from "../scenario-run.entity"; export class RunsQueryDto { @ApiPropertyOptional({ example: 1, default: 1 }) @IsOptional() @Type(() => Number) @IsInt() @Min(1) page?: number = 1; @ApiPropertyOptional({ example: 20, default: 20 }) @IsOptional() @Type(() => Number) @IsInt() @Min(1) limit?: number = 20; @ApiPropertyOptional({ enum: ["pending", "in_progress", "pass", "fail"], description: "Filter by run status", }) @IsOptional() @IsIn(["pending", "in_progress", "pass", "fail"]) status?: RunStatus; }