refactor: Remove InitialCount and RemainingCount properties from discount product commands
Build and Deploy / build (push) Successful in 1m53s
Build and Deploy / build (push) Successful in 1m53s
This commit is contained in:
-3
@@ -17,9 +17,6 @@ public record CreateDiscountProductCommand : IRequest<CreateDiscountProductRespo
|
|||||||
/// <summary>حداکثر درصد تخفیف (0-100)</summary>
|
/// <summary>حداکثر درصد تخفیف (0-100)</summary>
|
||||||
public int MaxDiscountPercent { get; init; }
|
public int MaxDiscountPercent { get; init; }
|
||||||
|
|
||||||
/// <summary>تعداد اولیه موجودی</summary>
|
|
||||||
public int InitialCount { get; init; }
|
|
||||||
|
|
||||||
/// <summary>ترتیب نمایش</summary>
|
/// <summary>ترتیب نمایش</summary>
|
||||||
public int SortOrder { get; init; }
|
public int SortOrder { get; init; }
|
||||||
|
|
||||||
|
|||||||
-1
@@ -21,7 +21,6 @@ public class CreateDiscountProductCommandHandler : IRequestHandler<CreateDiscoun
|
|||||||
FullInformation = request.FullInformation,
|
FullInformation = request.FullInformation,
|
||||||
Price = request.Price,
|
Price = request.Price,
|
||||||
MaxDiscountPercent = request.MaxDiscountPercent,
|
MaxDiscountPercent = request.MaxDiscountPercent,
|
||||||
InitialCount = request.InitialCount,
|
|
||||||
SortOrder = request.SortOrder,
|
SortOrder = request.SortOrder,
|
||||||
IsActive = request.IsActive
|
IsActive = request.IsActive
|
||||||
};
|
};
|
||||||
|
|||||||
-3
@@ -21,9 +21,6 @@ public class CreateDiscountProductCommandValidator : AbstractValidator<CreateDis
|
|||||||
RuleFor(x => x.MaxDiscountPercent)
|
RuleFor(x => x.MaxDiscountPercent)
|
||||||
.InclusiveBetween(0, 100).WithMessage("درصد تخفیف باید بین 0 تا 100 باشد");
|
.InclusiveBetween(0, 100).WithMessage("درصد تخفیف باید بین 0 تا 100 باشد");
|
||||||
|
|
||||||
RuleFor(x => x.InitialCount)
|
|
||||||
.GreaterThanOrEqualTo(0).WithMessage("تعداد اولیه نمیتواند منفی باشد");
|
|
||||||
|
|
||||||
RuleFor(x => x.CategoryIds)
|
RuleFor(x => x.CategoryIds)
|
||||||
.NotEmpty().WithMessage("حداقل یک دستهبندی باید انتخاب شود");
|
.NotEmpty().WithMessage("حداقل یک دستهبندی باید انتخاب شود");
|
||||||
}
|
}
|
||||||
|
|||||||
-1
@@ -8,7 +8,6 @@ public record CreateNewProductsCommand : IRequest<CreateNewProductsResponseDto>
|
|||||||
public long Price { get; init; }
|
public long Price { get; init; }
|
||||||
public int Discount { get; init; }
|
public int Discount { get; init; }
|
||||||
public int Rate { get; init; }
|
public int Rate { get; init; }
|
||||||
public int RemainingCount { get; init; }
|
|
||||||
public ImageFileModel ImageFile { get; init; }
|
public ImageFileModel ImageFile { get; init; }
|
||||||
public ImageFileModel ThumbnailFile { get; init; }
|
public ImageFileModel ThumbnailFile { get; init; }
|
||||||
// لیست شناسه دستهبندیهای محصول
|
// لیست شناسه دستهبندیهای محصول
|
||||||
|
|||||||
-1
@@ -9,7 +9,6 @@ public record UpdateProductsCommand : IRequest<Unit>
|
|||||||
public long Price { get; init; }
|
public long Price { get; init; }
|
||||||
public int Discount { get; init; }
|
public int Discount { get; init; }
|
||||||
public int Rate { get; init; }
|
public int Rate { get; init; }
|
||||||
public int RemainingCount { get; init; }
|
|
||||||
public string ImagePath { get; init; }
|
public string ImagePath { get; init; }
|
||||||
public string ThumbnailPath { get; init; }
|
public string ThumbnailPath { get; init; }
|
||||||
public ImageFileModel ImageFile { get; init; }
|
public ImageFileModel ImageFile { get; init; }
|
||||||
|
|||||||
Reference in New Issue
Block a user