diff --git a/src/CMSMicroservice.Application/UserOrderCQ/Commands/SubmitShopBuyOrder/SubmitShopBuyOrderResponseDto.cs b/src/CMSMicroservice.Application/UserOrderCQ/Commands/SubmitShopBuyOrder/SubmitShopBuyOrderResponseDto.cs index f5eb615..0eaaaf2 100644 --- a/src/CMSMicroservice.Application/UserOrderCQ/Commands/SubmitShopBuyOrder/SubmitShopBuyOrderResponseDto.cs +++ b/src/CMSMicroservice.Application/UserOrderCQ/Commands/SubmitShopBuyOrder/SubmitShopBuyOrderResponseDto.cs @@ -1,35 +1,7 @@ -using CMSMicroservice.Domain.Enums; - namespace CMSMicroservice.Application.UserOrderCQ.Commands.SubmitShopBuyOrder; public class SubmitShopBuyOrderResponseDto { //شناسه public long Id { get; set; } - // - public PaymentStatus PaymentStatus { get; set; } - // - public DateTime? PaymentDate { get; set; } - // - public PaymentMethod? PaymentMethod { get; set; } - // - public string? UserAddressText { get; set; } - // - public long? TotalAmount { get; set; } - // - public List? FactorDetails { get; set; } -}public class SubmitShopBuyOrderFactorDetail -{ - //شناسه - public long ProductId { get; set; } - // - public string ProductTitle { get; set; } - // - public string? ProductThumbnailPath { get; set; } - // - public long? UnitPrice { get; set; } - // - public int? Count { get; set; } - // - public long? UnitDiscountPrice { get; set; } -} +} \ No newline at end of file diff --git a/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetAllUserOrderByFilter/GetAllUserOrderByFilterResponseDto.cs b/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetAllUserOrderByFilter/GetAllUserOrderByFilterResponseDto.cs index f0dc233..361b29c 100644 --- a/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetAllUserOrderByFilter/GetAllUserOrderByFilterResponseDto.cs +++ b/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetAllUserOrderByFilter/GetAllUserOrderByFilterResponseDto.cs @@ -1,5 +1,3 @@ -using CMSMicroservice.Domain.Enums; - namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetAllUserOrderByFilter; public class GetAllUserOrderByFilterResponseDto { @@ -31,5 +29,20 @@ public class GetAllUserOrderByFilterResponseDto // public string? UserAddressText { get; set; } // - public long? TotalAmount { get; set; } + public List? FactorDetails { get; set; } +} +public class GetAllUserOrderByFilterResponseModelFactorDetail +{ + //شناسه + public long ProductId { get; set; } + // + public string ProductTitle { get; set; } + // + public string? ProductThumbnailPath { get; set; } + // + public long? UnitPrice { get; set; } + // + public int? Count { get; set; } + // + public long? UnitDiscountPrice { get; set; } } diff --git a/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetUserOrder/GetUserOrderResponseDto.cs b/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetUserOrder/GetUserOrderResponseDto.cs index e8279fb..934d502 100644 --- a/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetUserOrder/GetUserOrderResponseDto.cs +++ b/src/CMSMicroservice.Application/UserOrderCQ/Queries/GetUserOrder/GetUserOrderResponseDto.cs @@ -1,5 +1,3 @@ -using CMSMicroservice.Domain.Enums; - namespace CMSMicroservice.Application.UserOrderCQ.Queries.GetUserOrder; public class GetUserOrderResponseDto { @@ -22,8 +20,22 @@ public class GetUserOrderResponseDto // public PaymentMethod? PaymentMethod { get; set; } // - public long? TotalAmount { get; set; } - // public string? UserAddressText { get; set; } + // + public List? FactorDetails { get; set; } -} \ No newline at end of file +}public class GetUserOrderResponseFactorDetail +{ + //شناسه + public long ProductId { get; set; } + // + public string ProductTitle { get; set; } + // + public string? ProductThumbnailPath { get; set; } + // + public long? UnitPrice { get; set; } + // + public int? Count { get; set; } + // + public long? UnitDiscountPrice { get; set; } +} diff --git a/src/CMSMicroservice.Protobuf/Protos/userorder.proto b/src/CMSMicroservice.Protobuf/Protos/userorder.proto index b10ea73..7fe9182 100644 --- a/src/CMSMicroservice.Protobuf/Protos/userorder.proto +++ b/src/CMSMicroservice.Protobuf/Protos/userorder.proto @@ -114,8 +114,17 @@ message GetUserOrderResponse { messages.PaymentMethod payment_method = 9; } - google.protobuf.Int64Value total_amount = 10; - google.protobuf.StringValue user_address_text = 11; + google.protobuf.StringValue user_address_text = 10; + repeated GetUserOrderResponseFactorDetail factor_details = 11; +} +message GetUserOrderResponseFactorDetail +{ + int64 product_id = 1; + string product_title = 2; + google.protobuf.StringValue product_thumbnail_path = 3; + google.protobuf.Int64Value unit_price = 4; + google.protobuf.Int32Value count = 5; + google.protobuf.Int64Value unit_discount_price = 6; } message GetAllUserOrderByFilterRequest { @@ -164,7 +173,16 @@ message GetAllUserOrderByFilterResponseModel messages.PaymentMethod payment_method = 9; } google.protobuf.StringValue user_address_text = 10; - google.protobuf.Int64Value total_amount = 11; + repeated GetAllUserOrderByFilterResponseModelFactorDetail factor_details = 11; +} +message GetAllUserOrderByFilterResponseModelFactorDetail +{ + int64 product_id = 1; + string product_title = 2; + google.protobuf.StringValue product_thumbnail_path = 3; + google.protobuf.Int64Value unit_price = 4; + google.protobuf.Int32Value count = 5; + google.protobuf.Int64Value unit_discount_price = 6; } message SubmitShopBuyOrderRequest { @@ -174,25 +192,4 @@ message SubmitShopBuyOrderRequest message SubmitShopBuyOrderResponse { int64 id = 1; - oneof PaymentStatus_item - { - messages.PaymentStatus payment_status = 2; - } - google.protobuf.Timestamp payment_date = 3; - oneof PaymentMethod_item - { - messages.PaymentMethod payment_method = 4; - } - google.protobuf.StringValue user_address_text = 5; - google.protobuf.Int64Value total_amount = 6; - repeated SubmitShopBuyOrderFactorDetail factor_details = 7; -} -message SubmitShopBuyOrderFactorDetail -{ - int64 product_id = 1; - string product_title = 2; - google.protobuf.StringValue product_thumbnail_path = 3; - google.protobuf.Int64Value unit_price = 4; - google.protobuf.Int32Value count = 5; - google.protobuf.Int64Value unit_discount_price = 6; }