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

/**
 * Void the latest live confirmation on a collection. Used by:
 *   - "Edit confirmed" flow — void old + insert new via a follow-up
 *     confirm call (composed on the FE, guarded by PAYMENT_COLLECTION:delete)
 *   - Standalone "Undo mark collected" action
 *
 * A void refunds the linked settlement_payment via
 * PaymentSettlementService.voidPayment so the customer receivable
 * reopens for the amended amount.
 */
export class VoidConfirmationDto {
  @IsOptional()
  @IsString()
  @MaxLength(500)
  reason?: string;
}
