import { ApiPropertyOptional } from '@nestjs/swagger';
import { IsEnum, IsOptional } from 'class-validator';

import { CdcInProgressStatus } from '@/generated/prisma/client';

// How far along CDC-GPSF judges an in-progress issue or RGC decision to be.
// Sending null clears the judgement.
export class UpdateCdcInProgressStatusDto {
  @ApiPropertyOptional({
    enum: CdcInProgressStatus,
    nullable: true,
    example: CdcInProgressStatus.MID_PROGRESS,
    description: 'MID_PROGRESS, EARLY_PROGRESS, or null to clear it.',
  })
  @IsOptional()
  @IsEnum(CdcInProgressStatus)
  cdcInProgressStatus?: CdcInProgressStatus | null;
}
