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

export class UpdateRequestDto {
  @ApiPropertyOptional({
    description: 'Updated business/entity name',
    maxLength: 255,
    example: 'Updated Business Name Ltd.',
  })
  @IsOptional()
  @IsString()
  @MaxLength(255)
  businessName?: string;

  @ApiPropertyOptional({
    description: 'Updated description of the request',
    maxLength: 2000,
    example: 'Updated description with more details',
  })
  @IsOptional()
  @IsString()
  @MaxLength(2000)
  description?: string;

  @ApiPropertyOptional({
    description: 'Updated metadata for the request',
    type: Object,
    example: { property: 'updated_value', timestamp: '2024-01-16T10:30:00Z' },
  })
  @IsOptional()
  @IsObject()
  metadata?: Record<string, any>;
}
