import { IsString, IsOptional, IsArray, IsUUID, MinLength } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class RevalidateDto {
  @ApiProperty({
    description: 'Remarks confirming revalidation after document updates',
    minLength: 10,
    maxLength: 1000,
    example: 'Updated documents have been reviewed and verified. Approval is revalidated.',
  })
  @IsString()
  @MinLength(10)
  remarks: string;

  @ApiPropertyOptional({
    description: 'ID of the reviewer performing revalidation',
    example: 'user-id-123',
  })
  @IsOptional()
  @IsString()
  revalidatedBy?: string;

  @ApiPropertyOptional({
    description: 'Updated list of reviewed document IDs',
    type: [String],
    example: ['550e8400-e29b-41d4-a716-446655440000'],
  })
  @IsOptional()
  @IsArray()
  @IsUUID('4', { each: true })
  reviewedDocuments?: string[];
}
