import { IsNumber, IsString, MinLength, MaxLength, Min } from 'class-validator';

/**
 * Admin-only edit to a settlement's `amount` after creation. Settlement
 * service guards: new amount must not be less than the running
 * `amount_settled` (would push the balance negative); reason is
 * mandatory and audit-logged.
 */
export class EditSettlementAmountDto {
  @IsNumber()
  @Min(0.01)
  amount: number;

  @IsString()
  @MinLength(3)
  @MaxLength(500)
  reason: string;
}
