import { ArrayMaxSize, ArrayMinSize, IsArray, IsUUID } from 'class-validator';

/** Most invoices one bulk download may issue / refresh. */
export const BULK_INVOICE_MAX = 50;

/**
 * Body for `POST /accounting/invoices/bulk` — issue (or refresh) the tax
 * invoice of each booking, for one combined download.
 */
export class BulkGenerateInvoiceDto {
  @IsArray()
  @ArrayMinSize(1)
  @ArrayMaxSize(BULK_INVOICE_MAX)
  @IsUUID('all', { each: true })
  booking_ids: string[];
}
