using FluentValidation;

namespace Indotalent.Features.Purchase.PaymentDisburse.Cqrs;

public class UpdatePaymentDisburseValidator : AbstractValidator<UpdatePaymentDisburseRequest>
{
    public UpdatePaymentDisburseValidator()
    {
        RuleFor(x => x.Id).NotEmpty();
        RuleFor(x => x.BillId).NotEmpty().WithMessage("Bill reference is required");
        RuleFor(x => x.PaymentDate).NotEmpty().WithMessage("Payment date is required");
        RuleFor(x => x.PaymentAmount).GreaterThan(0).WithMessage("Amount must be greater than 0");
    }
}