import { IsString, IsOptional, IsEnum, MaxLength } from 'class-validator';
import { ExceptionStatus } from '../entities/matching-exception.entity';

/**
 * DTO for resolving a matching exception
 */
export class ResolveExceptionDto {
  @IsEnum(['approved', 'rejected'])
  resolution: Exclude<ExceptionStatus, 'pending'>;

  @IsOptional()
  @IsString()
  @MaxLength(1000)
  notes?: string;
}

/**
 * DTO for bulk resolving exceptions
 */
export class BulkResolveExceptionsDto {
  @IsString({ each: true })
  exceptionIds: string[];

  @IsEnum(['approved', 'rejected'])
  resolution: Exclude<ExceptionStatus, 'pending'>;

  @IsOptional()
  @IsString()
  @MaxLength(1000)
  notes?: string;
}
