import { IsInt, IsNumber, IsString, Min, MinLength } from 'class-validator';
import { Type } from 'class-transformer';

export class AdjustBalanceDto {
  @IsInt()
  @Type(() => Number)
  leave_type_id: number;

  @IsNumber()
  @Type(() => Number)
  adjustment: number;  // Positif pour créditer, négatif pour débiter

  @IsString()
  @MinLength(5, { message: 'Le motif doit contenir au moins 5 caractères' })
  reason: string;
}