diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs
index 5ac8509b..bd5a0e9b 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs
@@ -21,6 +21,8 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos
public decimal TotalDiscount { get; set; }
public decimal TotalPrice { get; set; }
+
+ public decimal ActualTotalPrice { get; set; }
public decimal RefundAmount { get; set; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs
index cf317ec2..1dd2f420 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs
@@ -32,6 +32,8 @@ namespace EasyAbp.EShop.Orders.Orders.Dtos
public decimal TotalPrice { get; set; }
public decimal TotalDiscount { get; set; }
+
+ public decimal ActualTotalPrice { get; set; }
public int Quantity { get; set; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
index 908928d3..caab6ac2 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
@@ -51,6 +51,7 @@ namespace EasyAbp.EShop.Orders.Orders
// Todo: totalPrice may contain other fee.
var totalPrice = productTotalPrice;
+ var totalDiscount = orderLines.Select(x => x.TotalDiscount).Sum();
var order = new Order(
id: _guidGenerator.Create(),
@@ -59,8 +60,9 @@ namespace EasyAbp.EShop.Orders.Orders
customerUserId: _currentUser.GetId(),
currency: await GetStoreCurrencyAsync(input.StoreId),
productTotalPrice: productTotalPrice,
- totalDiscount: orderLines.Select(x => x.TotalDiscount).Sum(),
+ totalDiscount: totalDiscount,
totalPrice: totalPrice,
+ actualTotalPrice: totalPrice - totalDiscount,
customerRemark: input.CustomerRemark);
foreach (var orderExtraProperty in orderExtraProperties)
@@ -84,6 +86,8 @@ namespace EasyAbp.EShop.Orders.Orders
{
throw new OrderLineInvalidQuantityException(product.Id, productSku.Id, input.Quantity);
}
+
+ var totalPrice = productSku.Price * input.Quantity;
return new OrderLine(
id: _guidGenerator.Create(),
@@ -99,8 +103,9 @@ namespace EasyAbp.EShop.Orders.Orders
mediaResources: product.MediaResources,
currency: productSku.Currency,
unitPrice: productSku.Price,
- totalPrice: productSku.Price * input.Quantity,
+ totalPrice: totalPrice,
totalDiscount: 0,
+ actualTotalPrice: totalPrice,
quantity: input.Quantity
);
}
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json
index 38c6c36e..764d8aaf 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json
@@ -11,6 +11,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -34,6 +35,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json
index 5fb7e20f..14c573cf 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json
@@ -12,6 +12,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -35,6 +36,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json
index 8445fc3c..9c797fce 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json
@@ -11,6 +11,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -34,6 +35,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json
index d2485504..2eae48db 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json
@@ -11,6 +11,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -34,6 +35,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json
index 78dff42c..187a09b2 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json
@@ -12,6 +12,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -35,6 +36,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json
index e1702c86..120a9e66 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json
@@ -12,6 +12,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -35,6 +36,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json
index d60adad5..4b01d58d 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json
@@ -11,6 +11,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -34,6 +35,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json
index 42ecd28a..417a738c 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json
@@ -12,6 +12,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -35,6 +36,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json
index 35195c8e..bc5b579e 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json
@@ -12,6 +12,7 @@
"OrderProductTotalPrice": "OrderProductTotalPrice",
"OrderTotalDiscount": "OrderTotalDiscount",
"OrderTotalPrice": "OrderTotalPrice",
+ "OrderActualTotalPrice": "OrderActualTotalPrice",
"OrderRefundedAmount": "OrderRefundedAmount",
"OrderCustomerRemark": "OrderCustomerRemark",
"OrderStaffRemark": "OrderStaffRemark",
@@ -35,6 +36,7 @@
"OrderLineUnitPrice": "OrderLineUnitPrice",
"OrderLineTotalPrice": "OrderLineTotalPrice",
"OrderLineTotalDiscount": "OrderLineTotalDiscount",
+ "OrderLineActualTotalPrice": "OrderLineActualTotalPrice",
"OrderLineQuantity": "OrderLineQuantity",
"CreateOrder": "CreateOrder",
"EditOrder": "EditOrder",
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
index 05a767ed..fa33d915 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
@@ -18,6 +18,11 @@ namespace EasyAbp.EShop.Orders.Orders
decimal TotalDiscount { get; }
decimal TotalPrice { get; }
+
+ ///
+ /// ActualTotalPrice = TotalPrice - TotalDiscount
+ ///
+ decimal ActualTotalPrice { get; }
decimal RefundAmount { get; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
index ae6003e3..a7e172fb 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
@@ -31,6 +31,11 @@ namespace EasyAbp.EShop.Orders.Orders
decimal TotalPrice { get; }
decimal TotalDiscount { get; }
+
+ ///
+ /// ActualTotalPrice = TotalPrice - TotalDiscount
+ ///
+ decimal ActualTotalPrice { get; }
int Quantity { get; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
index c4e7b7a1..fcfbc91c 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
@@ -27,6 +27,8 @@ namespace EasyAbp.EShop.Orders.Orders
public decimal TotalPrice { get; set; }
+ public decimal ActualTotalPrice { get; set; }
+
public decimal RefundAmount { get; set; }
public string CustomerRemark { get; set; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
index 08fa4f23..22f8521c 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
@@ -34,6 +34,8 @@ namespace EasyAbp.EShop.Orders.Orders
public decimal TotalPrice { get; set; }
public decimal TotalDiscount { get; set; }
+
+ public decimal ActualTotalPrice { get; set; }
public int Quantity { get; set; }
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
index e4433ef1..ef8d5df2 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
@@ -28,6 +28,8 @@ namespace EasyAbp.EShop.Orders.Orders
public virtual decimal TotalDiscount { get; protected set; }
public virtual decimal TotalPrice { get; protected set; }
+
+ public virtual decimal ActualTotalPrice { get; protected set; }
public virtual decimal RefundAmount { get; protected set; }
@@ -67,6 +69,7 @@ namespace EasyAbp.EShop.Orders.Orders
decimal productTotalPrice,
decimal totalDiscount,
decimal totalPrice,
+ decimal actualTotalPrice,
[CanBeNull] string customerRemark
) : base(id)
{
@@ -77,6 +80,7 @@ namespace EasyAbp.EShop.Orders.Orders
ProductTotalPrice = productTotalPrice;
TotalDiscount = totalDiscount;
TotalPrice = totalPrice;
+ ActualTotalPrice = actualTotalPrice;
CustomerRemark = customerRemark;
RefundAmount = 0;
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs
index 4a91c711..2ba7d8fc 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs
@@ -40,6 +40,8 @@ namespace EasyAbp.EShop.Orders.Orders
public virtual decimal TotalPrice { get; protected set; }
public virtual decimal TotalDiscount { get; protected set; }
+
+ public virtual decimal ActualTotalPrice { get; protected set; }
public virtual int Quantity { get; protected set; }
@@ -65,6 +67,7 @@ namespace EasyAbp.EShop.Orders.Orders
decimal unitPrice,
decimal totalPrice,
decimal totalDiscount,
+ decimal actualTotalPrice,
int quantity) : base(id)
{
ProductId = productId;
@@ -81,6 +84,7 @@ namespace EasyAbp.EShop.Orders.Orders
UnitPrice = unitPrice;
TotalPrice = totalPrice;
TotalDiscount = totalDiscount;
+ ActualTotalPrice = actualTotalPrice;
Quantity = quantity;
RefundedQuantity = 0;
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentChecker.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentChecker.cs
index 7b4a18b1..a748a452 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentChecker.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentChecker.cs
@@ -24,7 +24,7 @@ namespace EasyAbp.EShop.Orders.Orders
protected virtual Task IsPaymentPriceCorrectAsync(Order order, EShopPaymentItemEto paymentItem)
{
- return Task.FromResult(order.TotalPrice == paymentItem.OriginalPaymentAmount);
+ return Task.FromResult(order.ActualTotalPrice == paymentItem.OriginalPaymentAmount);
}
protected virtual Task IsUserAllowedToPayAsync(Order order, EShopPaymentEto payment)
diff --git a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp/EShop/Orders/EntityFrameworkCore/OrdersDbContextModelCreatingExtensions.cs b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp/EShop/Orders/EntityFrameworkCore/OrdersDbContextModelCreatingExtensions.cs
index 7e25df40..914e4355 100644
--- a/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp/EShop/Orders/EntityFrameworkCore/OrdersDbContextModelCreatingExtensions.cs
+++ b/modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp/EShop/Orders/EntityFrameworkCore/OrdersDbContextModelCreatingExtensions.cs
@@ -49,6 +49,7 @@ namespace EasyAbp.EShop.Orders.EntityFrameworkCore
b.Property(x => x.ProductTotalPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.TotalPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.TotalDiscount).HasColumnType("decimal(20,8)");
+ b.Property(x => x.ActualTotalPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)");
b.HasIndex(x => x.OrderNumber).IsUnique();
});
@@ -60,6 +61,7 @@ namespace EasyAbp.EShop.Orders.EntityFrameworkCore
/* Configure more properties here */
b.Property(x => x.TotalPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.TotalDiscount).HasColumnType("decimal(20,8)");
+ b.Property(x => x.ActualTotalPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.UnitPrice).HasColumnType("decimal(20,8)");
b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)");
});
diff --git a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
index 1522583c..f84918ca 100644
--- a/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
+++ b/modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
@@ -100,7 +100,7 @@ namespace EasyAbp.EShop.Payments.Payments
{
ItemType = PaymentsConsts.PaymentItemType,
ItemKey = order.Id.ToString(),
- OriginalPaymentAmount = order.TotalPrice,
+ OriginalPaymentAmount = order.ActualTotalPrice,
ExtraProperties = new Dictionary {{"StoreId", order.StoreId.ToString()}}
}).ToList()
};
diff --git a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderCompletedEventHandler.cs b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderCompletedEventHandler.cs
index 8c3d2415..74a57b75 100644
--- a/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderCompletedEventHandler.cs
+++ b/modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderCompletedEventHandler.cs
@@ -33,7 +33,7 @@ namespace EasyAbp.EShop.Stores.Transactions
var transaction = new Transaction(_guidGenerator.Create(), order.TenantId, order.StoreId, order.Id,
TransactionType.Debit, StoresConsts.TransactionOrderCompletedActionName, order.Currency,
- order.TotalPrice);
+ order.ActualTotalPrice);
await _transactionRepository.InsertAsync(transaction, true);
}
diff --git a/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.Designer.cs b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.Designer.cs
new file mode 100644
index 00000000..972d071a
--- /dev/null
+++ b/samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.Designer.cs
@@ -0,0 +1,4231 @@
+//
+using System;
+using EShopSample.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Volo.Abp.EntityFrameworkCore;
+
+namespace EShopSample.Migrations
+{
+ [DbContext(typeof(EShopSampleMigrationsDbContext))]
+ [Migration("20200831122106_AddedActualTotalPricePropertyToOrderEntity")]
+ partial class AddedActualTotalPricePropertyToOrderEntity
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
+ .HasAnnotation("ProductVersion", "3.1.5")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.Order", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CancellationReason")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderNumber")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("OrderStatus")
+ .HasColumnType("int");
+
+ b.Property("PaidTime")
+ .HasColumnType("datetime2");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("ReducedInventoryAfterPaymentTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ReducedInventoryAfterPlacingTime")
+ .HasColumnType("datetime2");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderNumber")
+ .IsUnique()
+ .HasFilter("[OrderNumber] IS NOT NULL");
+
+ b.ToTable("EasyAbpEShopOrdersOrders");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Orders.Orders.OrderLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualTotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("OrderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductDetailModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductDisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductTypeUniqueName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductUniqueName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundedQuantity")
+ .HasColumnType("int");
+
+ b.Property("SkuDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SkuName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UnitPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("OrderId");
+
+ b.ToTable("EasyAbpEShopOrdersOrderLines");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.Payment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PayeeAccount")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopPaymentsPayments");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Payments.PaymentItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ActualPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("ItemKey")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ItemType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OriginalPaymentAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PendingRefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PaymentId");
+
+ b.ToTable("EasyAbpEShopPaymentsPaymentItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.Refund", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CanceledTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("DisplayReason")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExternalTradingCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundPaymentMethod")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopPaymentsRefunds");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CustomerRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PaymentItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StaffRemark")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RefundId");
+
+ b.ToTable("EasyAbpEShopPaymentsRefundItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Payments.Refunds.RefundItemOrderLine", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OrderLineId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundAmount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("RefundItemId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RefundedQuantity")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RefundItemId");
+
+ b.ToTable("EasyAbpEShopPaymentsRefundItemOrderLines");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.BasketItems.BasketItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BasketName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Currency")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Inventory")
+ .HasColumnType("int");
+
+ b.Property("IsInvalid")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductDisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductUniqueName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Quantity")
+ .HasColumnType("int");
+
+ b.Property("SkuDescription")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("SkuName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("StoreId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TotalDiscount")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("TotalPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UnitPrice")
+ .HasColumnType("decimal(20,8)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("EasyAbpEShopPluginsBasketsBasketItems");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Plugins.Baskets.ProductUpdates.ProductUpdate", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductSkuId");
+
+ b.ToTable("EasyAbpEShopPluginsBasketsProductUpdates");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.Categories.Category", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisplayName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Level")
+ .HasColumnType("int");
+
+ b.Property("MediaResources")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UniqueName")
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("UniqueName")
+ .IsUnique()
+ .HasFilter("[UniqueName] IS NOT NULL");
+
+ b.ToTable("EasyAbpEShopProductsCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductCategories.ProductCategory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CategoryId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisplayOrder")
+ .HasColumnType("int");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopProductsProductCategories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetailHistories.ProductDetailHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductDetailId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SerializedEntityData")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModificationTime");
+
+ b.HasIndex("ProductDetailId");
+
+ b.ToTable("EasyAbpEShopProductsProductDetailHistories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductDetails.ProductDetail", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("EasyAbpEShopProductsProductDetails");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductHistories.ProductHistory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SerializedEntityData")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ModificationTime");
+
+ b.HasIndex("ProductId");
+
+ b.ToTable("EasyAbpEShopProductsProductHistories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductInventories.ProductInventory", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Inventory")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ProductSkuId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Sold")
+ .HasColumnType("bigint");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ProductSkuId");
+
+ b.ToTable("EasyAbpEShopProductsProductInventories");
+ });
+
+ modelBuilder.Entity("EasyAbp.EShop.Products.ProductStores.ProductStore", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp")
+ .HasColumnType("nvarchar(40)")
+ .HasMaxLength(40);
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime")
+ .HasColumnType("datetime2");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property