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

export class RequestChangesDto {
  @ApiProperty({
    description: 'Detailed remarks specifying what changes are needed',
    minLength: 10,
    maxLength: 1000,
    example: 'Please provide updated property ownership documents and building structural report.',
  })
  @IsString()
  @MinLength(10)
  remarks: string;

  @ApiPropertyOptional({
    description: 'List of document types that are required for resubmission',
    type: [String],
    example: ['PROPERTY_OWNERSHIP', 'STRUCTURAL_STABILITY_CERTIFICATE'],
  })
  @IsOptional()
  @IsArray()
  @IsString({ each: true })
  requiredDocuments?: string[];

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