import { IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';

/**
 * Query for `GET /payment-settlements/customer-outstanding` — feeds
 * the Payment Collection screen's outstanding grid.
 *
 * Customer key is `mobile`; `currency_id` constrains the result set to
 * one currency per the same-currency policy. When the user changes
 * the currency dropdown on the collection screen the grid refetches.
 */
export class CustomerOutstandingQueryDto {
  @IsString()
  @MaxLength(20)
  mobile: string;

  @IsUUID()
  @IsOptional()
  currency_id?: string;

  /** Add back this collection's payments so the collect form can re-edit them. */
  @IsUUID()
  @IsOptional()
  exclude_collection_id?: string;
}
