Merge branch 'newmain'

This commit is contained in:
masoodafar-web
2025-11-24 23:22:18 +03:30
parent 744f71ce6c
commit 25eee4ede3
30 changed files with 69 additions and 370 deletions
@@ -10,6 +10,8 @@ public class CreateNewTagRequestValidator : AbstractValidator<CreateNewTagReques
.NotEmpty();
RuleFor(model => model.Title)
.NotEmpty();
RuleFor(model => model.IsActive)
.NotNull();
RuleFor(model => model.SortOrder)
.NotNull();
}
@@ -21,4 +23,3 @@ public class CreateNewTagRequestValidator : AbstractValidator<CreateNewTagReques
return result.Errors.Select(e => e.ErrorMessage);
};
}
@@ -12,6 +12,8 @@ public class UpdateTagRequestValidator : AbstractValidator<UpdateTagRequest>
.NotEmpty();
RuleFor(model => model.Title)
.NotEmpty();
RuleFor(model => model.IsActive)
.NotNull();
RuleFor(model => model.SortOrder)
.NotNull();
}
@@ -23,4 +25,3 @@ public class UpdateTagRequestValidator : AbstractValidator<UpdateTagRequest>
return result.Errors.Select(e => e.ErrorMessage);
};
}
@@ -6,12 +6,8 @@ public class CreateNewTransactionsRequestValidator : AbstractValidator<CreateNew
{
public CreateNewTransactionsRequestValidator()
{
RuleFor(model => model.MerchantId)
.NotEmpty();
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.CallbackUrl)
.NotEmpty();
RuleFor(model => model.Description)
.NotEmpty();
RuleFor(model => model.PaymentStatus)
@@ -8,12 +8,8 @@ public class UpdateTransactionsRequestValidator : AbstractValidator<UpdateTransa
{
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.MerchantId)
.NotEmpty();
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.CallbackUrl)
.NotEmpty();
RuleFor(model => model.Description)
.NotEmpty();
RuleFor(model => model.PaymentStatus)
@@ -6,7 +6,7 @@ public class CreateNewUserOrderRequestValidator : AbstractValidator<CreateNewUse
{
public CreateNewUserOrderRequestValidator()
{
RuleFor(model => model.Price)
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.PackageId)
.NotNull();
@@ -8,7 +8,7 @@ public class UpdateUserOrderRequestValidator : AbstractValidator<UpdateUserOrder
{
RuleFor(model => model.Id)
.NotNull();
RuleFor(model => model.Price)
RuleFor(model => model.Amount)
.NotNull();
RuleFor(model => model.PackageId)
.NotNull();