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

/**
 * DTO used to search bank accounts linked to an associate.
 *
 * Allows filtering bank records based on the associate ID.
 */
export class SearchAssociateBanksDto {
  /**
   * Associate (Sub-Agent) identifier.
   *
   * Optional field:
   * - When provided, returns bank accounts for the given associate
   * - When omitted, returns all accessible bank accounts
   */
  @ApiPropertyOptional()
  @IsOptional()
  @IsNumber()
  associate_id: number;
}
