Add validators and services for Product Galleries and Product Tags

- Implemented Create, Delete, Get, and Update validators for Product Galleries.
- Added Create, Delete, Get, and Update validators for Product Tags.
- Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags.
- Each service class integrates with CQRS for command and query handling.
- Established mapping profiles for Product Galleries.
This commit is contained in:
masoodafar-web
2025-12-04 02:40:49 +03:30
parent 40d54d08fc
commit f0f48118e7
436 changed files with 33159 additions and 2005 deletions
@@ -2,10 +2,10 @@ namespace CMSMicroservice.Domain.Events;
public class ClearCartEvent : BaseEvent
{
public ClearCartEvent(UserCarts item)
public ClearCartEvent(UserCart item)
{
Item = item;
}
public UserCarts Item { get; }
public UserCart Item { get; }
}
@@ -2,7 +2,7 @@ namespace CMSMicroservice.Domain.Events;
public class DayaLoanApprovedEvent : BaseEvent
{
public DayaLoanApprovedEvent(User user, Transactions transaction, string contractNumber)
public DayaLoanApprovedEvent(User user, Transaction transaction, string contractNumber)
{
User = user;
Transaction = transaction;
@@ -10,6 +10,6 @@ public class DayaLoanApprovedEvent : BaseEvent
}
public User User { get; }
public Transactions Transaction { get; }
public Transaction Transaction { get; }
public string ContractNumber { get; }
}
@@ -0,0 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewProductCategoryEvent : BaseEvent
{
public CreateNewProductCategoryEvent(ProductCategory item)
{
}
public ProductCategory Item { get; }
}
@@ -0,0 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteProductCategoryEvent : BaseEvent
{
public DeleteProductCategoryEvent(ProductCategory item)
{
}
public ProductCategory Item { get; }
}
@@ -0,0 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateProductCategoryEvent : BaseEvent
{
public UpdateProductCategoryEvent(ProductCategory item)
{
}
public ProductCategory Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewProductGallerysEvent : BaseEvent
{
public CreateNewProductGallerysEvent(ProductGallerys item)
public CreateNewProductGallerysEvent(ProductGallery item)
{
}
public ProductGallerys Item { get; }
public ProductGallery Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteProductGallerysEvent : BaseEvent
{
public DeleteProductGallerysEvent(ProductGallerys item)
public DeleteProductGallerysEvent(ProductGallery item)
{
}
public ProductGallerys Item { get; }
public ProductGallery Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateProductGallerysEvent : BaseEvent
{
public UpdateProductGallerysEvent(ProductGallerys item)
public UpdateProductGallerysEvent(ProductGallery item)
{
}
public ProductGallerys Item { get; }
public ProductGallery Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewProductImagesEvent : BaseEvent
{
public CreateNewProductImagesEvent(ProductImages item)
public CreateNewProductImagesEvent(ProductImage item)
{
}
public ProductImages Item { get; }
public ProductImage Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteProductImagesEvent : BaseEvent
{
public DeleteProductImagesEvent(ProductImages item)
public DeleteProductImagesEvent(ProductImage item)
{
}
public ProductImages Item { get; }
public ProductImage Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateProductImagesEvent : BaseEvent
{
public UpdateProductImagesEvent(ProductImages item)
public UpdateProductImagesEvent(ProductImage item)
{
}
public ProductImages Item { get; }
public ProductImage Item { get; }
}
@@ -0,0 +1,10 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewProductTagEvent : BaseEvent
{
public CreateNewProductTagEvent(ProductTag item)
{
Item = item;
}
public ProductTag Item { get; }
}
@@ -0,0 +1,10 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteProductTagEvent : BaseEvent
{
public DeleteProductTagEvent(ProductTag item)
{
Item = item;
}
public ProductTag Item { get; }
}
@@ -0,0 +1,10 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateProductTagEvent : BaseEvent
{
public UpdateProductTagEvent(ProductTag item)
{
Item = item;
}
public ProductTag Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewProductsEvent : BaseEvent
{
public CreateNewProductsEvent(Products item)
public CreateNewProductsEvent(Product item)
{
}
public Products Item { get; }
public Product Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteProductsEvent : BaseEvent
{
public DeleteProductsEvent(Products item)
public DeleteProductsEvent(Product item)
{
}
public Products Item { get; }
public Product Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateProductsEvent : BaseEvent
{
public UpdateProductsEvent(Products item)
public UpdateProductsEvent(Product item)
{
}
public Products Item { get; }
public Product Item { get; }
}
@@ -1,8 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewPruductCategoryEvent : BaseEvent
{
public CreateNewPruductCategoryEvent(PruductCategory item)
{
}
public PruductCategory Item { get; }
}
@@ -1,8 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class DeletePruductCategoryEvent : BaseEvent
{
public DeletePruductCategoryEvent(PruductCategory item)
{
}
public PruductCategory Item { get; }
}
@@ -1,8 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class UpdatePruductCategoryEvent : BaseEvent
{
public UpdatePruductCategoryEvent(PruductCategory item)
{
}
public PruductCategory Item { get; }
}
@@ -1,10 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewPruductTagEvent : BaseEvent
{
public CreateNewPruductTagEvent(PruductTag item)
{
Item = item;
}
public PruductTag Item { get; }
}
@@ -1,10 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class DeletePruductTagEvent : BaseEvent
{
public DeletePruductTagEvent(PruductTag item)
{
Item = item;
}
public PruductTag Item { get; }
}
@@ -1,10 +0,0 @@
namespace CMSMicroservice.Domain.Events;
public class UpdatePruductTagEvent : BaseEvent
{
public UpdatePruductTagEvent(PruductTag item)
{
Item = item;
}
public PruductTag Item { get; }
}
@@ -2,12 +2,12 @@ namespace CMSMicroservice.Domain.Events;
public class RefundTransactionEvent : BaseEvent
{
public RefundTransactionEvent(Transactions refundTransaction, Transactions originalTransaction)
public RefundTransactionEvent(Transaction refundTransaction, Transaction originalTransaction)
{
RefundTransaction = refundTransaction;
OriginalTransaction = originalTransaction;
}
public Transactions RefundTransaction { get; }
public Transactions OriginalTransaction { get; }
public Transaction RefundTransaction { get; }
public Transaction OriginalTransaction { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewTransactionsEvent : BaseEvent
{
public CreateNewTransactionsEvent(Transactions item)
public CreateNewTransactionsEvent(Transaction item)
{
}
public Transactions Item { get; }
public Transaction Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteTransactionsEvent : BaseEvent
{
public DeleteTransactionsEvent(Transactions item)
public DeleteTransactionsEvent(Transaction item)
{
}
public Transactions Item { get; }
public Transaction Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateTransactionsEvent : BaseEvent
{
public UpdateTransactionsEvent(Transactions item)
public UpdateTransactionsEvent(Transaction item)
{
}
public Transactions Item { get; }
public Transaction Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class CreateNewUserCartsEvent : BaseEvent
{
public CreateNewUserCartsEvent(UserCarts item)
public CreateNewUserCartsEvent(UserCart item)
{
}
public UserCarts Item { get; }
public UserCart Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class DeleteUserCartsEvent : BaseEvent
{
public DeleteUserCartsEvent(UserCarts item)
public DeleteUserCartsEvent(UserCart item)
{
}
public UserCarts Item { get; }
public UserCart Item { get; }
}
@@ -1,8 +1,8 @@
namespace CMSMicroservice.Domain.Events;
public class UpdateUserCartsEvent : BaseEvent
{
public UpdateUserCartsEvent(UserCarts item)
public UpdateUserCartsEvent(UserCart item)
{
}
public UserCarts Item { get; }
public UserCart Item { get; }
}
@@ -2,10 +2,10 @@ namespace CMSMicroservice.Domain.Events;
public class VerifyTransactionEvent : BaseEvent
{
public VerifyTransactionEvent(Transactions item)
public VerifyTransactionEvent(Transaction item)
{
Item = item;
}
public Transactions Item { get; }
public Transaction Item { get; }
}