initial commit

This commit is contained in:
2026-07-21 14:08:10 +07:00
commit f7cf118326
533 changed files with 41762 additions and 0 deletions
@@ -0,0 +1,16 @@
using FluentValidation;
namespace Indotalent.Features.Leave.LeaveBalance.Cqrs;
public class CreateLeaveBalanceValidator : AbstractValidator<CreateLeaveBalanceRequest>
{
public CreateLeaveBalanceValidator()
{
RuleFor(x => x.EmployeeId).NotEmpty().WithMessage("Employee is required");
RuleFor(x => x.LeaveCategoryId).NotEmpty().WithMessage("Leave Category is required");
RuleFor(x => x.Year).GreaterThan(2000);
RuleFor(x => x.Entitlement).GreaterThanOrEqualTo(0);
RuleFor(x => x.ValidFrom).NotEmpty();
RuleFor(x => x.ValidTo).NotEmpty().GreaterThanOrEqualTo(x => x.ValidFrom);
}
}