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

/**
 * DTO used to search or filter associates.
 *
 * Currently supports filtering by product ID.
 */
export class SearchAssociatesDto {
  /**
   * Product identifier.
   *
   * Optional field:
   * - When provided, filters associates linked to the specified product
   * - When omitted, returns all associates
   */
  @ApiPropertyOptional()
  @IsOptional()
  @IsString()
  product_id?: string;
}
