Add migration for DiscountProductImages table
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m53s
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 1m53s
- Created a new table `DiscountProductImages` in the CMS schema. - Added columns for image details including `Title`, `AltText`, `ImagePath`, `ThumbnailPath`, `SortOrder`, `IsActive`, `Created`, `CreatedBy`, `LastModified`, `LastModifiedBy`, and `IsDeleted`. - Established a foreign key relationship with the `DiscountProducts` table. - Created indexes on `DiscountProductId` and a composite index on `DiscountProductId` and `SortOrder`.
This commit is contained in:
@@ -5,6 +5,8 @@ using CMSMicroservice.Application.DiscountShopCQ.Commands.CompleteOrderPayment;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.UpdateOrderStatus;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetOrderById;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetUserOrders;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetAllDiscountOrders;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetDiscountSalesReport;
|
||||
|
||||
namespace CMSMicroservice.WebApi.Services;
|
||||
|
||||
@@ -41,4 +43,14 @@ public class DiscountOrderService : DiscountOrderContract.DiscountOrderContractB
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetUserOrdersRequest, GetUserOrdersQuery, GetUserOrdersResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetAllDiscountOrdersResponse> GetAllDiscountOrders(GetAllDiscountOrdersRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetAllDiscountOrdersRequest, GetAllDiscountOrdersQuery, GetAllDiscountOrdersResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetDiscountSalesReportResponse> GetDiscountSalesReport(GetDiscountSalesReportRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetDiscountSalesReportRequest, GetDiscountSalesReportQuery, GetDiscountSalesReportResponse>(request, context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,13 @@ using CMSMicroservice.WebApi.Common.Services;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.CreateDiscountProduct;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.UpdateDiscountProduct;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.DeleteDiscountProduct;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.AddDiscountProductImage;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.UpdateDiscountProductImage;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.DeleteDiscountProductImage;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Commands.ReorderDiscountProductImages;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetDiscountProductById;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetDiscountProducts;
|
||||
using CMSMicroservice.Application.DiscountShopCQ.Queries.GetDiscountProductImages;
|
||||
|
||||
namespace CMSMicroservice.WebApi.Services;
|
||||
|
||||
@@ -41,4 +46,30 @@ public class DiscountProductService : DiscountProductContract.DiscountProductCon
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetDiscountProductsRequest, GetDiscountProductsQuery, GetDiscountProductsResponse>(request, context);
|
||||
}
|
||||
|
||||
// Product Image Gallery Operations
|
||||
public override async Task<AddDiscountProductImageResponse> AddDiscountProductImage(AddDiscountProductImageRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<AddDiscountProductImageRequest, AddDiscountProductImageCommand, AddDiscountProductImageResponse>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<Empty> UpdateDiscountProductImage(UpdateDiscountProductImageRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<UpdateDiscountProductImageRequest, UpdateDiscountProductImageCommand>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<Empty> DeleteDiscountProductImage(DeleteDiscountProductImageRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<DeleteDiscountProductImageRequest, DeleteDiscountProductImageCommand>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<Empty> ReorderDiscountProductImages(ReorderDiscountProductImagesRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<ReorderDiscountProductImagesRequest, ReorderDiscountProductImagesCommand>(request, context);
|
||||
}
|
||||
|
||||
public override async Task<GetDiscountProductImagesResponse> GetDiscountProductImages(GetDiscountProductImagesRequest request, ServerCallContext context)
|
||||
{
|
||||
return await _dispatchRequestToCQRS.Handle<GetDiscountProductImagesRequest, GetDiscountProductImagesQuery, GetDiscountProductImagesResponse>(request, context);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user