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,28 @@
using FluentValidation;
using Indotalent.Shared.Consts;
namespace Indotalent.Features.Payroll.Grade.Cqrs;
public class CreateGradeValidator : AbstractValidator<CreateGradeRequest>
{
public CreateGradeValidator()
{
RuleFor(x => x.Code)
.NotEmpty().WithMessage("Grade Code is required")
.MaximumLength(GlobalConsts.StringLengthShort);
RuleFor(x => x.Name)
.NotEmpty().WithMessage("Grade Name is required")
.MaximumLength(GlobalConsts.StringLengthShort);
RuleFor(x => x.SalaryFrom)
.GreaterThanOrEqualTo(0).WithMessage("Salary From must be 0 or greater");
RuleFor(x => x.SalaryTo)
.GreaterThanOrEqualTo(x => x.SalaryFrom).WithMessage("Salary To must be greater than or equal to Salary From");
RuleFor(x => x.Status)
.NotEmpty().WithMessage("Status is required")
.MaximumLength(GlobalConsts.StringLengthShort);
}
}