import { IsString, IsOptional, IsBoolean, IsIn, IsInt } from "class-validator";

/**
 * DTO for updating an existing quality gate
 */
export class UpdateQualityGateDto {
  @IsOptional()
  @IsString()
  name?: string;

  @IsOptional()
  @IsString()
  description?: string;

  @IsOptional()
  @IsIn(["build", "lint", "test", "coverage", "custom"])
  type?: string;

  @IsOptional()
  @IsString()
  command?: string;

  @IsOptional()
  @IsString()
  expectedOutput?: string;

  @IsOptional()
  @IsBoolean()
  isRegex?: boolean;

  @IsOptional()
  @IsBoolean()
  required?: boolean;

  @IsOptional()
  @IsInt()
  order?: number;

  @IsOptional()
  @IsBoolean()
  isEnabled?: boolean;
}
