import { IsOptional, IsString, IsEnum, IsNumber, IsArray, IsBoolean, Min, Max, IsDateString } from 'class-validator'

export class UpdateDocumentDto {
  @IsOptional() @IsString() matterId?: string
  @IsOptional() @IsString() title?: string
  @IsOptional() @IsString() documentType?: string
  @IsOptional() @IsEnum(['privileged', 'non_privileged', 'work_product']) privilege?: string
  @IsOptional() @IsString() folderId?: string | null

  // AI classification results
  @IsOptional() @IsEnum(['pending', 'processing', 'classified', 'failed']) aiStatus?: string
  @IsOptional() @IsString() summary?: string
  @IsOptional() @IsArray() @IsString({ each: true }) parties?: string[]
  @IsOptional() @IsDateString() documentDate?: string
  @IsOptional() @IsNumber() @Min(0) @Max(1) aiConfidence?: number
  @IsOptional() @IsString() detectedLanguage?: string
  @IsOptional() @IsBoolean() classified?: boolean
  @IsOptional() @IsString() classificationNotes?: string
  @IsOptional() @IsArray() @IsString({ each: true }) tags?: string[]

  // Translation
  @IsOptional() @IsString() translatedSummary?: string
  @IsOptional() @IsString() translatedSummaryLang?: string

  // Legacy
  @IsOptional() @IsString() storageRef?: string
  @IsOptional() @IsString() version?: string
  @IsOptional() @IsString() notes?: string
  @IsOptional() @IsBoolean() signed?: boolean
}
