diff --git a/src/BackOffice.BFF.Application/BackOffice.BFF.Application.csproj b/src/BackOffice.BFF.Application/BackOffice.BFF.Application.csproj
index 792b1b6..8862ee0 100644
--- a/src/BackOffice.BFF.Application/BackOffice.BFF.Application.csproj
+++ b/src/BackOffice.BFF.Application/BackOffice.BFF.Application.csproj
@@ -5,6 +5,24 @@
enable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommand.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommand.cs
new file mode 100644
index 0000000..b6c6107
--- /dev/null
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommand.cs
@@ -0,0 +1,14 @@
+using MediatR;
+using BffProto = BackOffice.BFF.PublicMessage.Protobuf;
+
+namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.CreatePublicMessage;
+
+public record CreatePublicMessageCommand : IRequest
+{
+ public string Title { get; init; } = string.Empty;
+ public string Content { get; init; } = string.Empty;
+ public int MessageType { get; init; }
+ public int Priority { get; init; }
+ public DateTime StartsAt { get; init; }
+ public DateTime ExpiresAt { get; init; }
+}
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommandHandler.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommandHandler.cs
index 0ab857f..d72f231 100644
--- a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/CreatePublicMessage/CreatePublicMessageCommandHandler.cs
@@ -1,11 +1,12 @@
using BackOffice.BFF.Application.Common.Interfaces;
using Google.Protobuf.WellKnownTypes;
+using MediatR;
using BffProto = BackOffice.BFF.PublicMessage.Protobuf;
using CmsProto = CMSMicroservice.Protobuf.Protos;
namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.CreatePublicMessage;
-public class CreatePublicMessageCommandHandler : IRequestHandler
+public class CreatePublicMessageCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -14,7 +15,7 @@ public class CreatePublicMessageCommandHandler : IRequestHandler Handle(BffProto.CreatePublicMessageRequest request, CancellationToken cancellationToken)
+ public async Task Handle(CreatePublicMessageCommand request, CancellationToken cancellationToken)
{
var cmsRequest = new CmsProto.CreatePublicMessageRequest
{
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommand.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommand.cs
new file mode 100644
index 0000000..113c4df
--- /dev/null
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommand.cs
@@ -0,0 +1,9 @@
+using MediatR;
+using BffProto = BackOffice.BFF.PublicMessage.Protobuf;
+
+namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.DeletePublicMessage;
+
+public record DeletePublicMessageCommand : IRequest
+{
+ public long MessageId { get; init; }
+}
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommandHandler.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommandHandler.cs
index 8f1e320..144a96b 100644
--- a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/DeletePublicMessage/DeletePublicMessageCommandHandler.cs
@@ -5,7 +5,7 @@ using CmsProto = CMSMicroservice.Protobuf.Protos;
namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.DeletePublicMessage;
-public class DeletePublicMessageCommandHandler : IRequestHandler
+public class DeletePublicMessageCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -14,7 +14,7 @@ public class DeletePublicMessageCommandHandler : IRequestHandler Handle(BffProto.DeletePublicMessageRequest request, CancellationToken cancellationToken)
+ public async Task Handle(DeletePublicMessageCommand request, CancellationToken cancellationToken)
{
var cmsRequest = new CmsProto.DeletePublicMessageRequest
{
@@ -25,7 +25,11 @@ public class DeletePublicMessageCommandHandler : IRequestHandler
+{
+ public long MessageId { get; init; }
+}
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/PublishMessage/PublishMessageCommandHandler.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/PublishMessage/PublishMessageCommandHandler.cs
index 7b1889b..909534e 100644
--- a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/PublishMessage/PublishMessageCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/PublishMessage/PublishMessageCommandHandler.cs
@@ -5,7 +5,7 @@ using CmsProto = CMSMicroservice.Protobuf.Protos;
namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.PublishMessage;
-public class PublishMessageCommandHandler : IRequestHandler
+public class PublishMessageCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -14,7 +14,7 @@ public class PublishMessageCommandHandler : IRequestHandler Handle(BffProto.PublishMessageRequest request, CancellationToken cancellationToken)
+ public async Task Handle(PublishMessageCommand request, CancellationToken cancellationToken)
{
var cmsRequest = new CmsProto.PublishMessageRequest
{
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommand.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommand.cs
new file mode 100644
index 0000000..98a2ba3
--- /dev/null
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommand.cs
@@ -0,0 +1,15 @@
+using MediatR;
+using BffProto = BackOffice.BFF.PublicMessage.Protobuf;
+
+namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.UpdatePublicMessage;
+
+public record UpdatePublicMessageCommand : IRequest
+{
+ public long MessageId { get; init; }
+ public string Title { get; init; } = string.Empty;
+ public string Content { get; init; } = string.Empty;
+ public int MessageType { get; init; }
+ public int Priority { get; init; }
+ public DateTime StartsAt { get; init; }
+ public DateTime ExpiresAt { get; init; }
+}
diff --git a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommandHandler.cs b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommandHandler.cs
index c1adf62..25dbe86 100644
--- a/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/PublicMessageCQ/Commands/UpdatePublicMessage/UpdatePublicMessageCommandHandler.cs
@@ -6,7 +6,7 @@ using CmsProto = CMSMicroservice.Protobuf.Protos;
namespace BackOffice.BFF.Application.PublicMessageCQ.Commands.UpdatePublicMessage;
-public class UpdatePublicMessageCommandHandler : IRequestHandler
+public class UpdatePublicMessageCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -15,7 +15,7 @@ public class UpdatePublicMessageCommandHandler : IRequestHandler Handle(BffProto.UpdatePublicMessageRequest request, CancellationToken cancellationToken)
+ public async Task Handle(UpdatePublicMessageCommand request, CancellationToken cancellationToken)
{
var cmsRequest = new CmsProto.UpdatePublicMessageRequest
{
@@ -32,8 +32,11 @@ public class UpdatePublicMessageCommandHandler : IRequestHandler
+public record ApplyDiscountToOrderCommand : IRequest
{
public long OrderId { get; init; }
public long DiscountAmount { get; init; }
diff --git a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/ApplyDiscountToOrder/ApplyDiscountToOrderCommandHandler.cs b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/ApplyDiscountToOrder/ApplyDiscountToOrderCommandHandler.cs
index 2f0d037..a2c26a6 100644
--- a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/ApplyDiscountToOrder/ApplyDiscountToOrderCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/ApplyDiscountToOrder/ApplyDiscountToOrderCommandHandler.cs
@@ -1,12 +1,12 @@
using BackOffice.BFF.Application.Common.Interfaces;
-using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
-using CMSMicroservice.Protobuf.Protos.UserOrder;
using MediatR;
using Microsoft.Extensions.Logging;
+using BffProto = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
+using CmsProto = CMSMicroservice.Protobuf.Protos.UserOrder;
namespace BackOffice.BFF.Application.UserOrderCQ.Commands.ApplyDiscountToOrder;
-public class ApplyDiscountToOrderCommandHandler : IRequestHandler
+public class ApplyDiscountToOrderCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
private readonly ILogger _logger;
@@ -19,9 +19,9 @@ public class ApplyDiscountToOrderCommandHandler : IRequestHandler Handle(ApplyDiscountToOrderCommand request, CancellationToken cancellationToken)
+ public async Task Handle(ApplyDiscountToOrderCommand request, CancellationToken cancellationToken)
{
- var grpcRequest = new ApplyDiscountToOrderRequest
+ var grpcRequest = new CmsProto.ApplyDiscountToOrderRequest
{
OrderId = request.OrderId,
DiscountAmount = request.DiscountAmount,
@@ -37,7 +37,7 @@ public class ApplyDiscountToOrderCommandHandler : IRequestHandler
+public record CancelOrderCommand : IRequest
{
public long OrderId { get; init; }
public string CancelReason { get; init; } = string.Empty;
diff --git a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/CancelOrder/CancelOrderCommandHandler.cs b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/CancelOrder/CancelOrderCommandHandler.cs
index a53610b..3f96d95 100644
--- a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/CancelOrder/CancelOrderCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/CancelOrder/CancelOrderCommandHandler.cs
@@ -1,12 +1,12 @@
using BackOffice.BFF.Application.Common.Interfaces;
-using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
-using CMSMicroservice.Protobuf.Protos.UserOrder;
using MediatR;
using Microsoft.Extensions.Logging;
+using BffProto = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
+using CmsProto = CMSMicroservice.Protobuf.Protos.UserOrder;
namespace BackOffice.BFF.Application.UserOrderCQ.Commands.CancelOrder;
-public class CancelOrderCommandHandler : IRequestHandler
+public class CancelOrderCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
private readonly ILogger _logger;
@@ -19,9 +19,9 @@ public class CancelOrderCommandHandler : IRequestHandler Handle(CancelOrderCommand request, CancellationToken cancellationToken)
+ public async Task Handle(CancelOrderCommand request, CancellationToken cancellationToken)
{
- var grpcRequest = new CMSMicroservice.Protobuf.Protos.UserOrder.CancelOrderRequest
+ var grpcRequest = new CmsProto.CancelOrderRequest
{
OrderId = request.OrderId,
CancelReason = request.CancelReason ?? string.Empty,
@@ -36,7 +36,7 @@ public class CancelOrderCommandHandler : IRequestHandler
+public record UpdateOrderStatusCommand : IRequest
{
public long OrderId { get; init; }
public int NewStatus { get; init; }
diff --git a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/UpdateOrderStatus/UpdateOrderStatusCommandHandler.cs b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/UpdateOrderStatus/UpdateOrderStatusCommandHandler.cs
index c89cea3..352cade 100644
--- a/src/BackOffice.BFF.Application/UserOrderCQ/Commands/UpdateOrderStatus/UpdateOrderStatusCommandHandler.cs
+++ b/src/BackOffice.BFF.Application/UserOrderCQ/Commands/UpdateOrderStatus/UpdateOrderStatusCommandHandler.cs
@@ -1,12 +1,12 @@
using BackOffice.BFF.Application.Common.Interfaces;
-using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
-using CMSMicroservice.Protobuf.Protos.UserOrder;
using MediatR;
using Microsoft.Extensions.Logging;
+using BffProto = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
+using CmsProto = CMSMicroservice.Protobuf.Protos.UserOrder;
namespace BackOffice.BFF.Application.UserOrderCQ.Commands.UpdateOrderStatus;
-public class UpdateOrderStatusCommandHandler : IRequestHandler
+public class UpdateOrderStatusCommandHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
private readonly ILogger _logger;
@@ -19,9 +19,9 @@ public class UpdateOrderStatusCommandHandler : IRequestHandler Handle(UpdateOrderStatusCommand request, CancellationToken cancellationToken)
+ public async Task Handle(UpdateOrderStatusCommand request, CancellationToken cancellationToken)
{
- var grpcRequest = new UpdateOrderStatusRequest
+ var grpcRequest = new CmsProto.UpdateOrderStatusRequest
{
OrderId = request.OrderId,
NewStatus = request.NewStatus
@@ -36,7 +36,7 @@ public class UpdateOrderStatusCommandHandler : IRequestHandler
+public record CalculateOrderPVQuery : IRequest
{
public long OrderId { get; init; }
}
diff --git a/src/BackOffice.BFF.Application/UserOrderCQ/Queries/CalculateOrderPV/CalculateOrderPVQueryHandler.cs b/src/BackOffice.BFF.Application/UserOrderCQ/Queries/CalculateOrderPV/CalculateOrderPVQueryHandler.cs
index 8362ebb..ca01856 100644
--- a/src/BackOffice.BFF.Application/UserOrderCQ/Queries/CalculateOrderPV/CalculateOrderPVQueryHandler.cs
+++ b/src/BackOffice.BFF.Application/UserOrderCQ/Queries/CalculateOrderPV/CalculateOrderPVQueryHandler.cs
@@ -1,11 +1,11 @@
using BackOffice.BFF.Application.Common.Interfaces;
-using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
-using CMSMicroservice.Protobuf.Protos.UserOrder;
using MediatR;
+using BffProto = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
+using CmsProto = CMSMicroservice.Protobuf.Protos.UserOrder;
namespace BackOffice.BFF.Application.UserOrderCQ.Queries.CalculateOrderPV;
-public class CalculateOrderPVQueryHandler : IRequestHandler
+public class CalculateOrderPVQueryHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -14,16 +14,16 @@ public class CalculateOrderPVQueryHandler : IRequestHandler Handle(CalculateOrderPVQuery request, CancellationToken cancellationToken)
+ public async Task Handle(CalculateOrderPVQuery request, CancellationToken cancellationToken)
{
- var grpcRequest = new CalculateOrderPVRequest
+ var grpcRequest = new CmsProto.CalculateOrderPVRequest
{
OrderId = request.OrderId
};
var response = await _context.UserOrders.CalculateOrderPVAsync(grpcRequest, cancellationToken: cancellationToken);
- var result = new CalculateOrderPVResponse
+ var result = new BffProto.CalculateOrderPVResponse
{
OrderId = response.OrderId,
TotalPv = response.TotalPv
@@ -31,7 +31,7 @@ public class CalculateOrderPVQueryHandler : IRequestHandler
+public record GetOrdersByDateRangeQuery : IRequest
{
public DateTime StartDate { get; init; }
public DateTime EndDate { get; init; }
diff --git a/src/BackOffice.BFF.Application/UserOrderCQ/Queries/GetOrdersByDateRange/GetOrdersByDateRangeQueryValidator.cs b/src/BackOffice.BFF.Application/UserOrderCQ/Queries/GetOrdersByDateRange/GetOrdersByDateRangeQueryValidator.cs
index 4de19e7..9f151cf 100644
--- a/src/BackOffice.BFF.Application/UserOrderCQ/Queries/GetOrdersByDateRange/GetOrdersByDateRangeQueryValidator.cs
+++ b/src/BackOffice.BFF.Application/UserOrderCQ/Queries/GetOrdersByDateRange/GetOrdersByDateRangeQueryValidator.cs
@@ -1,12 +1,12 @@
using BackOffice.BFF.Application.Common.Interfaces;
-using BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
-using CMSMicroservice.Protobuf.Protos.UserOrder;
using Google.Protobuf.WellKnownTypes;
using MediatR;
+using BffProto = BackOffice.BFF.UserOrder.Protobuf.Protos.UserOrder;
+using CmsProto = CMSMicroservice.Protobuf.Protos.UserOrder;
namespace BackOffice.BFF.Application.UserOrderCQ.Queries.GetOrdersByDateRange;
-public class GetOrdersByDateRangeQueryHandler : IRequestHandler
+public class GetOrdersByDateRangeQueryHandler : IRequestHandler
{
private readonly IApplicationContractContext _context;
@@ -15,9 +15,9 @@ public class GetOrdersByDateRangeQueryHandler : IRequestHandler Handle(GetOrdersByDateRangeQuery request, CancellationToken cancellationToken)
+ public async Task Handle(GetOrdersByDateRangeQuery request, CancellationToken cancellationToken)
{
- var grpcRequest = new GetOrdersByDateRangeRequest
+ var grpcRequest = new CmsProto.GetOrdersByDateRangeRequest
{
StartDate = Timestamp.FromDateTime(request.StartDate.ToUniversalTime()),
EndDate = Timestamp.FromDateTime(request.EndDate.ToUniversalTime()),
@@ -27,19 +27,19 @@ public class GetOrdersByDateRangeQueryHandler : IRequestHandler..\..\..
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BackOffice.BFF.WebApi/Services/CommissionService.cs b/src/BackOffice.BFF.WebApi/Services/CommissionService.cs
index 607cab3..602ba8a 100644
--- a/src/BackOffice.BFF.WebApi/Services/CommissionService.cs
+++ b/src/BackOffice.BFF.WebApi/Services/CommissionService.cs
@@ -7,7 +7,7 @@ using BackOffice.BFF.Application.CommissionCQ.Queries.GetWithdrawalRequests;
using BackOffice.BFF.Application.CommissionCQ.Queries.GetWithdrawalReports;
using BackOffice.BFF.Application.CommissionCQ.Commands.ApproveWithdrawal;
using BackOffice.BFF.Application.CommissionCQ.Commands.RejectWithdrawal;
-using BackOffice.BFF.Application.CommissionCQ.Commands.ProcessWithdrawal;
+// using BackOffice.BFF.Application.CommissionCQ.Commands.ProcessWithdrawal; // Excluded - needs proto fix
using CMSMicroservice.Protobuf.Protos.Commission;
using Google.Protobuf.WellKnownTypes;
@@ -91,10 +91,8 @@ public class CommissionService : CommissionContract.CommissionContractBase
ProcessWithdrawalRequest request,
ServerCallContext context)
{
- await _dispatchRequestToCQRS.Handle(
- request,
- context);
- return new Empty();
+ // TODO: Implement after ProcessWithdrawalCommand is fixed
+ throw new RpcException(new Status(StatusCode.Unimplemented, "ProcessWithdrawal is temporarily disabled"));
}
public override async Task GetWithdrawalReports(
diff --git a/src/BackOffice.BFF.WebApi/Services/ProductsService.cs b/src/BackOffice.BFF.WebApi/Services/ProductsService.cs
index ddbc247..d665c30 100644
--- a/src/BackOffice.BFF.WebApi/Services/ProductsService.cs
+++ b/src/BackOffice.BFF.WebApi/Services/ProductsService.cs
@@ -49,20 +49,21 @@ public class ProductsService : ProductsContract.ProductsContractBase
return await _dispatchRequestToCQRS.Handle(request, context);
}
- public override async Task AddProductImage(AddProductImageRequest request, ServerCallContext context)
- {
- return await _dispatchRequestToCQRS.Handle(request, context);
- }
-
- public override async Task GetProductGallery(GetProductGalleryRequest request, ServerCallContext context)
- {
- return await _dispatchRequestToCQRS.Handle(request, context);
- }
-
- public override async Task RemoveProductImage(RemoveProductImageRequest request, ServerCallContext context)
- {
- return await _dispatchRequestToCQRS.Handle(request, context);
- }
+ // TODO: These methods require proto types that don't exist yet (AddProductImageRequest, GetProductGalleryRequest, RemoveProductImageRequest)
+ // public override async Task AddProductImage(AddProductImageRequest request, ServerCallContext context)
+ // {
+ // return await _dispatchRequestToCQRS.Handle(request, context);
+ // }
+ //
+ // public override async Task GetProductGallery(GetProductGalleryRequest request, ServerCallContext context)
+ // {
+ // return await _dispatchRequestToCQRS.Handle(request, context);
+ // }
+ //
+ // public override async Task RemoveProductImage(RemoveProductImageRequest request, ServerCallContext context)
+ // {
+ // return await _dispatchRequestToCQRS.Handle(request, context);
+ // }
public override async Task GetCategories(GetCategoriesRequest request, ServerCallContext context)
{
diff --git a/src/BackOffice.BFF.sln b/src/BackOffice.BFF.sln
index 59e983c..9b284e8 100644
--- a/src/BackOffice.BFF.sln
+++ b/src/BackOffice.BFF.sln
@@ -43,6 +43,18 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.Common.Proto
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.ManualPayment.Protobuf", "Protobufs\BackOffice.BFF.ManualPayment.Protobuf\BackOffice.BFF.ManualPayment.Protobuf.csproj", "{389D8C44-E796-41EE-BBF2-7A058735EA50}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.Tag.Protobuf", "Protobufs\BackOffice.BFF.Tag.Protobuf\BackOffice.BFF.Tag.Protobuf.csproj", "{E9949E81-51E4-4A7D-B076-D1B7488DE73F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.ProductTag.Protobuf", "Protobufs\BackOffice.BFF.ProductTag.Protobuf\BackOffice.BFF.ProductTag.Protobuf.csproj", "{18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.DiscountProduct.Protobuf", "Protobufs\BackOffice.BFF.DiscountProduct.Protobuf\BackOffice.BFF.DiscountProduct.Protobuf.csproj", "{66E4ACC8-194C-4773-AB23-B1DF5579C402}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.DiscountCategory.Protobuf", "Protobufs\BackOffice.BFF.DiscountCategory.Protobuf\BackOffice.BFF.DiscountCategory.Protobuf.csproj", "{1EB020B6-0BFD-4F50-8035-E5B548CECF3B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.DiscountOrder.Protobuf", "Protobufs\BackOffice.BFF.DiscountOrder.Protobuf\BackOffice.BFF.DiscountOrder.Protobuf.csproj", "{DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackOffice.BFF.DiscountShoppingCart.Protobuf", "Protobufs\BackOffice.BFF.DiscountShoppingCart.Protobuf\BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj", "{32A1D40E-525E-4E38-8AD6-FDC21503FCE7}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -281,6 +293,78 @@ Global
{389D8C44-E796-41EE-BBF2-7A058735EA50}.Release|x64.Build.0 = Release|Any CPU
{389D8C44-E796-41EE-BBF2-7A058735EA50}.Release|x86.ActiveCfg = Release|Any CPU
{389D8C44-E796-41EE-BBF2-7A058735EA50}.Release|x86.Build.0 = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|x64.Build.0 = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Debug|x86.Build.0 = Debug|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|x64.ActiveCfg = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|x64.Build.0 = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|x86.ActiveCfg = Release|Any CPU
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F}.Release|x86.Build.0 = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|x64.Build.0 = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Debug|x86.Build.0 = Debug|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|x64.ActiveCfg = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|x64.Build.0 = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|x86.ActiveCfg = Release|Any CPU
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD}.Release|x86.Build.0 = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|x64.Build.0 = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Debug|x86.Build.0 = Debug|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|x64.ActiveCfg = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|x64.Build.0 = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|x86.ActiveCfg = Release|Any CPU
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402}.Release|x86.Build.0 = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|x64.Build.0 = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Debug|x86.Build.0 = Debug|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|x64.ActiveCfg = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|x64.Build.0 = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|x86.ActiveCfg = Release|Any CPU
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B}.Release|x86.Build.0 = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|x64.Build.0 = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Debug|x86.Build.0 = Debug|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|x64.ActiveCfg = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|x64.Build.0 = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|x86.ActiveCfg = Release|Any CPU
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48}.Release|x86.Build.0 = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|x64.Build.0 = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Debug|x86.Build.0 = Debug|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|x64.ActiveCfg = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|x64.Build.0 = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|x86.ActiveCfg = Release|Any CPU
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -301,6 +385,12 @@ Global
{3B7514DE-1C2F-4BB1-BBD5-C57BEEC6843E} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{9911D6BE-3022-44F6-B93B-B3D62A14FBCA} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{389D8C44-E796-41EE-BBF2-7A058735EA50} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {E9949E81-51E4-4A7D-B076-D1B7488DE73F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {18F8F2B9-F35C-494C-B50B-8A8A34EB06CD} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {66E4ACC8-194C-4773-AB23-B1DF5579C402} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {1EB020B6-0BFD-4F50-8035-E5B548CECF3B} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {DCED8D9C-1C31-4B1D-9D9A-787A13A32C48} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
+ {32A1D40E-525E-4E38-8AD6-FDC21503FCE7} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0AE1AB4A-3C91-4853-93C2-C2476E79F845}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj
new file mode 100644
index 0000000..528f951
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/BackOffice.BFF.DiscountCategory.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.DiscountCategory.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/discountcategory.proto b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/discountcategory.proto
new file mode 100644
index 0000000..bcc7241
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/discountcategory.proto
@@ -0,0 +1,100 @@
+syntax = "proto3";
+
+package discountcategory;
+
+import "public_messages.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "BackOffice.BFF.DiscountCategory.Protobuf.Protos.DiscountCategory";
+
+service DiscountCategoryContract
+{
+ rpc CreateDiscountCategory(CreateDiscountCategoryRequest) returns (CreateDiscountCategoryResponse){
+ option (google.api.http) = {
+ post: "/CreateDiscountCategory"
+ body: "*"
+ };
+ };
+ rpc UpdateDiscountCategory(UpdateDiscountCategoryRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ put: "/UpdateDiscountCategory"
+ body: "*"
+ };
+ };
+ rpc DeleteDiscountCategory(DeleteDiscountCategoryRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ delete: "/DeleteDiscountCategory"
+ body: "*"
+ };
+ };
+ rpc GetDiscountCategories(GetDiscountCategoriesRequest) returns (GetDiscountCategoriesResponse){
+ option (google.api.http) = {
+ get: "/GetDiscountCategories"
+ };
+ };
+}
+
+// Create Category
+message CreateDiscountCategoryRequest
+{
+ string name = 1;
+ string title = 2;
+ google.protobuf.StringValue description = 3;
+ google.protobuf.StringValue image_path = 4;
+ google.protobuf.Int64Value parent_category_id = 5;
+ int32 sort_order = 6;
+ bool is_active = 7;
+}
+
+message CreateDiscountCategoryResponse
+{
+ int64 category_id = 1;
+}
+
+// Update Category
+message UpdateDiscountCategoryRequest
+{
+ int64 category_id = 1;
+ string name = 2;
+ string title = 3;
+ google.protobuf.StringValue description = 4;
+ google.protobuf.StringValue image_path = 5;
+ google.protobuf.Int64Value parent_category_id = 6;
+ int32 sort_order = 7;
+ bool is_active = 8;
+}
+
+// Delete Category
+message DeleteDiscountCategoryRequest
+{
+ int64 category_id = 1;
+}
+
+// Get Categories with Tree Structure
+message GetDiscountCategoriesRequest
+{
+ google.protobuf.Int64Value parent_category_id = 1; // null = root categories
+ google.protobuf.BoolValue is_active = 2;
+}
+
+message GetDiscountCategoriesResponse
+{
+ repeated DiscountCategoryDto categories = 1;
+}
+
+message DiscountCategoryDto
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+ google.protobuf.StringValue description = 4;
+ google.protobuf.StringValue image_path = 5;
+ google.protobuf.Int64Value parent_category_id = 6;
+ int32 sort_order = 7;
+ bool is_active = 8;
+ int32 product_count = 9;
+ repeated DiscountCategoryDto children = 10; // Recursive children
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountCategory.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj
new file mode 100644
index 0000000..2737607
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/BackOffice.BFF.DiscountOrder.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.DiscountOrder.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/discountorder.proto b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/discountorder.proto
new file mode 100644
index 0000000..5739e9d
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/discountorder.proto
@@ -0,0 +1,177 @@
+syntax = "proto3";
+
+package discountorder;
+
+import "public_messages.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "BackOffice.BFF.DiscountOrder.Protobuf.Protos.DiscountOrder";
+
+service DiscountOrderContract
+{
+ rpc PlaceOrder(PlaceOrderRequest) returns (PlaceOrderResponse){
+ option (google.api.http) = {
+ post: "/PlaceOrder"
+ body: "*"
+ };
+ };
+ rpc CompleteOrderPayment(CompleteOrderPaymentRequest) returns (CompleteOrderPaymentResponse){
+ option (google.api.http) = {
+ post: "/CompleteOrderPayment"
+ body: "*"
+ };
+ };
+ rpc UpdateOrderStatus(UpdateOrderStatusRequest) returns (UpdateOrderStatusResponse){
+ option (google.api.http) = {
+ put: "/UpdateOrderStatus"
+ body: "*"
+ };
+ };
+ rpc GetOrderById(GetOrderByIdRequest) returns (GetOrderByIdResponse){
+ option (google.api.http) = {
+ get: "/GetOrderById"
+ };
+ };
+ rpc GetUserOrders(GetUserOrdersRequest) returns (GetUserOrdersResponse){
+ option (google.api.http) = {
+ get: "/GetUserOrders"
+ };
+ };
+}
+
+// Place Order (Initial Step - Create Order)
+message PlaceOrderRequest
+{
+ int64 user_id = 1;
+ int64 user_address_id = 2;
+ int64 discount_balance_to_use = 3; // Amount from DiscountBalance wallet
+ google.protobuf.StringValue notes = 4;
+}
+
+message PlaceOrderResponse
+{
+ bool success = 1;
+ string message = 2;
+ int64 order_id = 3;
+ int64 gateway_amount = 4; // Amount to pay via gateway (if any)
+ google.protobuf.StringValue payment_url = 5; // Payment gateway URL (if needed)
+}
+
+// Complete Order Payment (After Gateway Callback)
+message CompleteOrderPaymentRequest
+{
+ int64 order_id = 1;
+ google.protobuf.StringValue transaction_id = 2;
+ bool payment_success = 3;
+}
+
+message CompleteOrderPaymentResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
+// Update Order Status (Admin)
+message UpdateOrderStatusRequest
+{
+ int64 order_id = 1;
+ DeliveryStatus delivery_status = 2;
+ google.protobuf.StringValue tracking_code = 3;
+ google.protobuf.StringValue admin_notes = 4;
+}
+
+message UpdateOrderStatusResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
+enum DeliveryStatus
+{
+ DELIVERY_PENDING = 0;
+ DELIVERY_PROCESSING = 1;
+ DELIVERY_SHIPPED = 2;
+ DELIVERY_DELIVERED = 3;
+ DELIVERY_CANCELLED = 4;
+}
+
+// Get Order By Id
+message GetOrderByIdRequest
+{
+ int64 order_id = 1;
+ int64 user_id = 2; // For authorization check
+}
+
+message GetOrderByIdResponse
+{
+ int64 id = 1;
+ int64 user_id = 2;
+ string order_number = 3;
+ AddressInfo address = 4;
+ int64 total_price = 5;
+ int64 discount_balance_used = 6;
+ int64 gateway_amount = 7;
+ bool payment_completed = 8;
+ google.protobuf.StringValue transaction_id = 9;
+ DeliveryStatus delivery_status = 10;
+ google.protobuf.StringValue tracking_code = 11;
+ google.protobuf.StringValue notes = 12;
+ google.protobuf.StringValue admin_notes = 13;
+ repeated OrderItemDto items = 14;
+ google.protobuf.Timestamp created = 15;
+ google.protobuf.Timestamp last_modified = 16;
+}
+
+message AddressInfo
+{
+ int64 id = 1;
+ string title = 2;
+ string address = 3;
+ string postal_code = 4;
+ google.protobuf.StringValue phone = 5;
+}
+
+message OrderItemDto
+{
+ int64 product_id = 1;
+ string product_title = 2;
+ int64 unit_price = 3;
+ int32 max_discount_percent = 4;
+ int32 count = 5;
+ int64 total_price = 6;
+ int64 discount_amount = 7;
+ int64 final_price = 8;
+}
+
+// Get User Orders
+message GetUserOrdersRequest
+{
+ int64 user_id = 1;
+ google.protobuf.BoolValue payment_completed = 2;
+ google.protobuf.Int32Value delivery_status = 3; // DeliveryStatus as int
+ int32 page_number = 4;
+ int32 page_size = 5;
+}
+
+message GetUserOrdersResponse
+{
+ messages.MetaData meta_data = 1;
+ repeated OrderSummaryDto models = 2;
+}
+
+message OrderSummaryDto
+{
+ int64 id = 1;
+ string order_number = 2;
+ int64 total_price = 3;
+ int64 discount_balance_used = 4;
+ int64 gateway_amount = 5;
+ bool payment_completed = 6;
+ DeliveryStatus delivery_status = 7;
+ google.protobuf.StringValue tracking_code = 8;
+ int32 items_count = 9;
+ google.protobuf.Timestamp created = 10;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountOrder.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj
new file mode 100644
index 0000000..c4ed5a0
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/BackOffice.BFF.DiscountProduct.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.DiscountProduct.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/discountproduct.proto b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/discountproduct.proto
new file mode 100644
index 0000000..b513a12
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/discountproduct.proto
@@ -0,0 +1,152 @@
+syntax = "proto3";
+
+package discountproduct;
+
+import "public_messages.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "BackOffice.BFF.DiscountProduct.Protobuf.Protos.DiscountProduct";
+
+service DiscountProductContract
+{
+ rpc CreateDiscountProduct(CreateDiscountProductRequest) returns (CreateDiscountProductResponse){
+ option (google.api.http) = {
+ post: "/CreateDiscountProduct"
+ body: "*"
+ };
+ };
+ rpc UpdateDiscountProduct(UpdateDiscountProductRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ put: "/UpdateDiscountProduct"
+ body: "*"
+ };
+ };
+ rpc DeleteDiscountProduct(DeleteDiscountProductRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ delete: "/DeleteDiscountProduct"
+ body: "*"
+ };
+ };
+ rpc GetDiscountProductById(GetDiscountProductByIdRequest) returns (GetDiscountProductByIdResponse){
+ option (google.api.http) = {
+ get: "/GetDiscountProductById"
+ };
+ };
+ rpc GetDiscountProducts(GetDiscountProductsRequest) returns (GetDiscountProductsResponse){
+ option (google.api.http) = {
+ get: "/GetDiscountProducts"
+ };
+ };
+}
+
+// Create Product
+message CreateDiscountProductRequest
+{
+ string title = 1;
+ string short_infomation = 2;
+ string full_information = 3;
+ int64 price = 4;
+ int32 max_discount_percent = 5;
+ string image_path = 6;
+ string thumbnail_path = 7;
+ int32 initial_count = 8;
+ int32 sort_order = 9;
+ bool is_active = 10;
+ repeated int64 category_ids = 11;
+}
+
+message CreateDiscountProductResponse
+{
+ int64 product_id = 1;
+}
+
+// Update Product
+message UpdateDiscountProductRequest
+{
+ int64 product_id = 1;
+ string title = 2;
+ string short_infomation = 3;
+ string full_information = 4;
+ int64 price = 5;
+ int32 max_discount_percent = 6;
+ string image_path = 7;
+ string thumbnail_path = 8;
+ int32 sort_order = 9;
+ bool is_active = 10;
+ repeated int64 category_ids = 11;
+}
+
+// Delete Product
+message DeleteDiscountProductRequest
+{
+ int64 product_id = 1;
+}
+
+// Get Product By Id
+message GetDiscountProductByIdRequest
+{
+ int64 product_id = 1;
+ int64 user_id = 2; // Optional for view count tracking
+}
+
+message GetDiscountProductByIdResponse
+{
+ int64 id = 1;
+ string title = 2;
+ string short_infomation = 3;
+ string full_information = 4;
+ int64 price = 5;
+ int32 max_discount_percent = 6;
+ string image_path = 7;
+ string thumbnail_path = 8;
+ int32 remaining_count = 9;
+ int32 view_count = 10;
+ int32 sort_order = 11;
+ bool is_active = 12;
+ repeated CategoryInfo categories = 13;
+ google.protobuf.Timestamp created = 14;
+}
+
+message CategoryInfo
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+}
+
+// Get Products with Filters
+message GetDiscountProductsRequest
+{
+ google.protobuf.Int64Value category_id = 1;
+ google.protobuf.StringValue search_query = 2;
+ google.protobuf.Int64Value min_price = 3;
+ google.protobuf.Int64Value max_price = 4;
+ google.protobuf.BoolValue is_active = 5;
+ google.protobuf.BoolValue in_stock = 6;
+ int32 page_number = 7;
+ int32 page_size = 8;
+}
+
+message GetDiscountProductsResponse
+{
+ messages.MetaData meta_data = 1;
+ repeated DiscountProductDto models = 2;
+}
+
+message DiscountProductDto
+{
+ int64 id = 1;
+ string title = 2;
+ string short_infomation = 3;
+ int64 price = 4;
+ int32 max_discount_percent = 5;
+ string image_path = 6;
+ string thumbnail_path = 7;
+ int32 remaining_count = 8;
+ int32 view_count = 9;
+ bool is_active = 10;
+ google.protobuf.Timestamp created = 11;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountProduct.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj
new file mode 100644
index 0000000..609e4ba
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/BackOffice.BFF.DiscountShoppingCart.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.DiscountShoppingCart.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/discountshoppingcart.proto b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/discountshoppingcart.proto
new file mode 100644
index 0000000..9dff816
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/discountshoppingcart.proto
@@ -0,0 +1,120 @@
+syntax = "proto3";
+
+package discountshoppingcart;
+
+import "public_messages.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "BackOffice.BFF.DiscountShoppingCart.Protobuf.Protos.DiscountShoppingCart";
+
+service DiscountShoppingCartContract
+{
+ rpc AddToCart(AddToCartRequest) returns (AddToCartResponse){
+ option (google.api.http) = {
+ post: "/AddToCart"
+ body: "*"
+ };
+ };
+ rpc RemoveFromCart(RemoveFromCartRequest) returns (RemoveFromCartResponse){
+ option (google.api.http) = {
+ delete: "/RemoveFromCart"
+ body: "*"
+ };
+ };
+ rpc UpdateCartItemCount(UpdateCartItemCountRequest) returns (UpdateCartItemCountResponse){
+ option (google.api.http) = {
+ put: "/UpdateCartItemCount"
+ body: "*"
+ };
+ };
+ rpc GetUserCart(GetUserCartRequest) returns (GetUserCartResponse){
+ option (google.api.http) = {
+ get: "/GetUserCart"
+ };
+ };
+ rpc ClearCart(ClearCartRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ delete: "/ClearCart"
+ body: "*"
+ };
+ };
+}
+
+// Add to Cart
+message AddToCartRequest
+{
+ int64 user_id = 1;
+ int64 product_id = 2;
+ int32 count = 3;
+}
+
+message AddToCartResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
+// Remove from Cart
+message RemoveFromCartRequest
+{
+ int64 user_id = 1;
+ int64 product_id = 2;
+}
+
+message RemoveFromCartResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
+// Update Cart Item Count
+message UpdateCartItemCountRequest
+{
+ int64 user_id = 1;
+ int64 product_id = 2;
+ int32 new_count = 3;
+}
+
+message UpdateCartItemCountResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
+// Get User Cart
+message GetUserCartRequest
+{
+ int64 user_id = 1;
+}
+
+message GetUserCartResponse
+{
+ repeated CartItemDto items = 1;
+ int64 total_price = 2;
+ int64 total_discount_amount = 3;
+ int64 final_price = 4;
+}
+
+message CartItemDto
+{
+ int64 product_id = 1;
+ string product_title = 2;
+ string product_image_path = 3;
+ int64 unit_price = 4;
+ int32 max_discount_percent = 5;
+ int32 count = 6;
+ int64 total_price = 7;
+ int64 discount_amount = 8;
+ int64 final_price = 9;
+ int32 product_remaining_count = 10;
+ google.protobuf.Timestamp created = 11;
+}
+
+// Clear Cart
+message ClearCartRequest
+{
+ int64 user_id = 1;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.DiscountShoppingCart.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj
new file mode 100644
index 0000000..bceb759
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/BackOffice.BFF.ProductTag.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.ProductTag.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/producttag.proto b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/producttag.proto
new file mode 100644
index 0000000..b7eb1d0
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.ProductTag.Protobuf/Protos/producttag.proto
@@ -0,0 +1,108 @@
+syntax = "proto3";
+
+package producttag;
+
+import "public_messages.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+import "google/api/annotations.proto";
+
+option csharp_namespace = "BackOffice.BFF.ProductTag.Protobuf.Protos.ProductTag";
+
+service ProductTagContract
+{
+ rpc CreateNewProductTag(CreateNewProductTagRequest) returns (CreateNewProductTagResponse){
+ option (google.api.http) = {
+ post: "/CreateNewProductTag"
+ body: "*"
+ };
+ };
+ rpc UpdateProductTag(UpdateProductTagRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ put: "/UpdateProductTag"
+ body: "*"
+ };
+ };
+ rpc DeleteProductTag(DeleteProductTagRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ delete: "/DeleteProductTag"
+ body: "*"
+ };
+ };
+ rpc GetProductTag(GetProductTagRequest) returns (GetProductTagResponse){
+ option (google.api.http) = {
+ get: "/GetProductTag"
+
+ };
+ };
+ rpc GetAllProductTagByFilter(GetAllProductTagByFilterRequest) returns (GetAllProductTagByFilterResponse){
+ option (google.api.http) = {
+ get: "/GetAllProductTagByFilter"
+
+ };
+ };
+}
+
+message CreateNewProductTagRequest
+{
+ int64 product_id = 1;
+ int64 tag_id = 2;
+}
+
+message CreateNewProductTagResponse
+{
+ int64 id = 1;
+}
+
+message UpdateProductTagRequest
+{
+ int64 id = 1;
+ int64 product_id = 2;
+ int64 tag_id = 3;
+}
+
+message DeleteProductTagRequest
+{
+ int64 id = 1;
+}
+
+message GetProductTagRequest
+{
+ int64 id = 1;
+}
+
+message GetProductTagResponse
+{
+ int64 id = 1;
+ int64 product_id = 2;
+ int64 tag_id = 3;
+}
+
+message GetAllProductTagByFilterRequest
+{
+ messages.PaginationState pagination_state = 1;
+ google.protobuf.StringValue sort_by = 2;
+ GetAllProductTagByFilterFilter filter = 3;
+}
+
+message GetAllProductTagByFilterFilter
+{
+ google.protobuf.Int64Value id = 1;
+ google.protobuf.Int64Value product_id = 2;
+ google.protobuf.Int64Value tag_id = 3;
+}
+
+message GetAllProductTagByFilterResponse
+{
+ messages.MetaData meta_data = 1;
+ repeated GetAllProductTagByFilterResponseModel models = 2;
+}
+
+message GetAllProductTagByFilterResponseModel
+{
+ int64 id = 1;
+ int64 product_id = 2;
+ int64 tag_id = 3;
+}
diff --git a/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/products.proto b/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/products.proto
index 0c1f73c..14a5708 100644
--- a/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/products.proto
+++ b/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/products.proto
@@ -9,7 +9,7 @@ import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
-option csharp_namespace = "CMSMicroservice.Protobuf.Protos.Products";
+option csharp_namespace = "BackOffice.BFF.Products.Protobuf.Protos.Products";
service ProductsContract
{
@@ -66,6 +66,46 @@ service ProductsContract
body: "*"
};
};
+ rpc GetProductsForCategory(GetProductsForCategoryRequest) returns (GetProductsForCategoryResponse){
+ option (google.api.http) = {
+ get: "/GetProductsForCategory"
+ };
+ };
+ rpc GetCategories(GetCategoriesRequest) returns (GetCategoriesResponse){
+ option (google.api.http) = {
+ get: "/GetCategories"
+ };
+ };
+ rpc UpdateProductCategories(UpdateProductCategoriesRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ post: "/UpdateProductCategories"
+ body: "*"
+ };
+ };
+ rpc UpdateCategoryProducts(UpdateCategoryProductsRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ post: "/UpdateCategoryProducts"
+ body: "*"
+ };
+ };
+
+ // Product Gallery / Image Management
+ rpc GetProductGallery(GetProductGalleryRequest) returns (GetProductGalleryResponse){
+ option (google.api.http) = {
+ get: "/GetProductGallery"
+ };
+ };
+ rpc AddProductImage(AddProductImageRequest) returns (AddProductImageResponse){
+ option (google.api.http) = {
+ post: "/AddProductImage"
+ body: "*"
+ };
+ };
+ rpc RemoveProductImage(RemoveProductImageRequest) returns (google.protobuf.Empty){
+ option (google.api.http) = {
+ delete: "/RemoveProductImage"
+ };
+ };
}
message CreateNewProductsRequest
{
@@ -274,3 +314,106 @@ message ToggleProductStatusResponse
int32 failed = 3;
repeated BulkOperationError errors = 4;
}
+
+// Category Product Item (for drag-drop UI)
+message CategoryProductItem
+{
+ int64 id = 1;
+ string title = 2;
+ bool selected = 3;
+}
+
+// Get Products for Category
+message GetProductsForCategoryRequest
+{
+ int64 category_id = 1;
+}
+
+message GetProductsForCategoryResponse
+{
+ repeated CategoryProductItem items = 1;
+}
+
+// Category Item (for product categories drag-drop)
+message CategoryItem
+{
+ int64 id = 1;
+ string title = 2;
+ bool selected = 3;
+}
+
+// Get Categories for Product
+message GetCategoriesRequest
+{
+ int64 product_id = 1;
+}
+
+message GetCategoriesResponse
+{
+ repeated CategoryItem items = 1;
+}
+
+// Update Product Categories
+message UpdateProductCategoriesRequest
+{
+ int64 product_id = 1;
+ repeated int64 category_ids = 2;
+}
+
+// Update Category Products
+message UpdateCategoryProductsRequest
+{
+ int64 category_id = 1;
+ repeated int64 product_ids = 2;
+}
+
+// Image File Model
+message ImageFileModel
+{
+ bytes file = 1;
+ string mime = 2;
+ string file_name = 3;
+}
+
+// Get Product Gallery
+message GetProductGalleryRequest
+{
+ int64 product_id = 1;
+}
+
+message ProductGalleryItem
+{
+ int64 product_gallery_id = 1;
+ int64 product_image_id = 2;
+ string title = 3;
+ string image_path = 4;
+ string image_thumbnail_path = 5;
+}
+
+message GetProductGalleryResponse
+{
+ repeated ProductGalleryItem items = 1;
+}
+
+// Add Product Image
+message AddProductImageRequest
+{
+ int64 product_id = 1;
+ string title = 2;
+ ImageFileModel image_file = 3;
+}
+
+message AddProductImageResponse
+{
+ int64 product_gallery_id = 1;
+ int64 product_image_id = 2;
+ string title = 3;
+ string image_path = 4;
+ string image_thumbnail_path = 5;
+}
+
+// Remove Product Image
+message RemoveProductImageRequest
+{
+ int64 product_gallery_id = 1;
+}
diff --git a/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/public_messages.proto b/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/public_messages.proto
new file mode 100644
index 0000000..1271c41
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.Products.Protobuf/Protos/public_messages.proto
@@ -0,0 +1,70 @@
+syntax = "proto3";
+
+package messages;
+
+option csharp_namespace = "BackOffice.BFF.Products.Protobuf.Protos";
+service PublicMessageContract{}
+message PaginationState
+{
+ int32 page_number = 1;
+
+ int32 page_size = 2;
+}
+message MetaData
+{
+ int64 current_page = 1;
+
+ int64 total_page = 2;
+
+ int64 page_size = 3;
+
+ int64 total_count = 4;
+
+ bool has_previous = 5;
+
+ bool has_next = 6;
+}
+message DecimalValue
+{
+
+ int64 units = 1;
+
+ sfixed32 nanos = 2;
+}
+enum PaymentStatus
+{
+ Success = 0;
+ Reject = 1;
+ Pending = 2;
+}
+// وضعیت ارسال سفارش
+enum DeliveryStatus
+{
+ // نامشخص / نیاز به ارسال ندارد (مثلا سفارش پکیج)
+ DeliveryStatus_None = 0;
+ // ثبت شده و در انتظار آمادهسازی/ارسال
+ DeliveryStatus_Pending = 1;
+ // تحویل پست/حملونقل شده است
+ DeliveryStatus_InTransit = 2;
+ // توسط مشتری دریافت شده است
+ DeliveryStatus_Delivered = 3;
+ // مرجوع شده
+ DeliveryStatus_Returned = 4;
+}
+enum TransactionType
+{
+ Buy = 0;
+ DepositIpg = 1;
+ DepositExternal1 = 2;
+ Withdraw = 3;
+}
+enum ContractType
+{
+ Main = 0;
+ CMS = 1;
+}
+enum PaymentMethod
+{
+ IPG = 0;
+ Wallet = 1;
+}
diff --git a/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/Protos/public_messages.proto b/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/Protos/public_messages.proto
index 279ef8c..1a88d32 100644
--- a/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/Protos/public_messages.proto
+++ b/src/Protobufs/BackOffice.BFF.PublicMessage.Protobuf/Protos/public_messages.proto
@@ -10,8 +10,8 @@ package publicmessages;
service PublicMessageContract
{
rpc CreatePublicMessage(CreatePublicMessageRequest) returns (CreatePublicMessageResponse);
- rpc UpdatePublicMessage(UpdatePublicMessageRequest) returns (UpdatePublicMessageRequest);
- rpc DeletePublicMessage(DeletePublicMessageRequest) returns (DeletePublicMessageRequest);
+ rpc UpdatePublicMessage(UpdatePublicMessageRequest) returns (UpdatePublicMessageResponse);
+ rpc DeletePublicMessage(DeletePublicMessageRequest) returns (DeletePublicMessageResponse);
rpc PublishMessage(PublishMessageRequest) returns (PublishMessageResponse);
rpc ArchiveMessage(ArchiveMessageRequest) returns (ArchiveMessageResponse);
rpc GetAllMessages(GetAllMessagesRequest) returns (GetAllMessagesResponse);
@@ -55,12 +55,24 @@ message UpdatePublicMessageRequest
repeated string tags = 10;
}
+message UpdatePublicMessageResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
// Delete Public Message
message DeletePublicMessageRequest
{
int64 message_id = 1;
}
+message DeletePublicMessageResponse
+{
+ bool success = 1;
+ string message = 2;
+}
+
// Publish Message
message PublishMessageRequest
{
diff --git a/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj
new file mode 100644
index 0000000..73165a4
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/BackOffice.BFF.Tag.Protobuf.csproj
@@ -0,0 +1,33 @@
+
+
+
+ net9.0
+ enable
+ enable
+ 0.0.1
+ None
+ False
+ False
+ Foursat.BackOffice.BFF.Tag.Protobuf
+
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/annotations.proto b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/annotations.proto
new file mode 100644
index 0000000..85c361b
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/annotations.proto
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/api/http.proto";
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "AnnotationsProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.MethodOptions {
+ // See `HttpRule`.
+ HttpRule http = 72295728;
+}
diff --git a/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/http.proto b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/http.proto
new file mode 100644
index 0000000..bd21963
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/google/api/http.proto
@@ -0,0 +1,51 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.api;
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "HttpProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+message Http {
+ repeated HttpRule rules = 1;
+ bool fully_decode_reserved_expansion = 2;
+}
+
+message HttpRule {
+ string selector = 1;
+
+ oneof pattern {
+ string get = 2;
+ string put = 3;
+ string post = 4;
+ string delete = 5;
+ string patch = 6;
+ CustomHttpPattern custom = 8;
+ }
+
+ string body = 7;
+ string response_body = 12;
+ repeated HttpRule additional_bindings = 11;
+}
+
+message CustomHttpPattern {
+ string kind = 1;
+ string path = 2;
+}
diff --git a/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/tag.proto b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/tag.proto
new file mode 100644
index 0000000..e3c28e6
--- /dev/null
+++ b/src/Protobufs/BackOffice.BFF.Tag.Protobuf/Protos/tag.proto
@@ -0,0 +1,139 @@
+syntax = "proto3";
+
+package tag;
+
+import "google/protobuf/empty.proto";
+import "google/protobuf/wrappers.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "BackOffice.BFF.Tag.Protobuf.Protos.Tag";
+
+service TagContract
+{
+ rpc CreateNewTag(CreateNewTagRequest) returns (CreateNewTagResponse);
+ rpc UpdateTag(UpdateTagRequest) returns (google.protobuf.Empty);
+ rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty);
+ rpc GetTag(GetTagRequest) returns (GetTagResponse);
+ rpc GetAllTagByFilter(GetAllTagByFilterRequest) returns (GetAllTagByFilterResponse);
+ rpc GetProductsByTag(GetProductsByTagRequest) returns (GetProductsByTagResponse);
+}
+
+// Create Tag
+message CreateNewTagRequest
+{
+ string name = 1;
+ string title = 2;
+ string description = 3;
+ bool is_active = 4;
+ int32 sort_order = 5;
+}
+
+message CreateNewTagResponse
+{
+ int64 id = 1;
+}
+
+// Update Tag
+message UpdateTagRequest
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+ string description = 4;
+ bool is_active = 5;
+ int32 sort_order = 6;
+}
+
+// Delete Tag
+message DeleteTagRequest
+{
+ int64 id = 1;
+}
+
+// Get Tag
+message GetTagRequest
+{
+ int64 id = 1;
+}
+
+message GetTagResponse
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+ string description = 4;
+ bool is_active = 5;
+ int32 sort_order = 6;
+}
+
+// Get All Tags
+message GetAllTagByFilterRequest
+{
+ PaginationState pagination_state = 1;
+ string sort_by = 2;
+ GetAllTagByFilterFilter filter = 3;
+}
+
+message GetAllTagByFilterFilter
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+ string description = 4;
+ bool is_active = 5;
+ int32 sort_order = 6;
+}
+
+message GetAllTagByFilterResponse
+{
+ MetaData meta_data = 1;
+ repeated TagModel models = 2;
+}
+
+message TagModel
+{
+ int64 id = 1;
+ string name = 2;
+ string title = 3;
+ string description = 4;
+ bool is_active = 5;
+ int32 sort_order = 6;
+}
+
+// Get Products By Tag
+message GetProductsByTagRequest
+{
+ int64 tag_id = 1;
+}
+
+message GetProductsByTagResponse
+{
+ repeated ProductSimpleModel products = 1;
+}
+
+message ProductSimpleModel
+{
+ int64 id = 1;
+ string title = 2;
+ int64 price = 3;
+ int32 inventory = 4;
+ bool is_active = 5;
+ string image_path = 6;
+}
+
+// Common
+message PaginationState
+{
+ int32 page_number = 1;
+ int32 page_size = 2;
+}
+
+message MetaData
+{
+ int32 current_page = 1;
+ int32 total_page = 2;
+ int32 page_size = 3;
+ int64 total_count = 4;
+ bool has_previous = 5;
+ bool has_next = 6;
+}