using CMSMicroservice.Domain.Common; using FluentValidation; namespace CMSMicroservice.Application.WalletCQ.Commands.AdminManualCreditCharge; public class AdminManualCreditChargeCommandValidator : AbstractValidator { public AdminManualCreditChargeCommandValidator() { RuleFor(x => x.UserId) .GreaterThan(0) .WithMessage("شناسه کاربر باید بزرگتر از صفر باشد"); RuleFor(x => x.Amount) .GreaterThanOrEqualTo(SystemConstants.DiscountWalletMinCharge) .WithMessage("حداقل مبلغ شارژ ۱۰,۰۰۰ تومان است") .LessThanOrEqualTo(SystemConstants.WalletMaxSafeAmount) .WithMessage("مبلغ وارد شده بیش از حد مجاز است"); } }