Browse Source

Add Order.ActualTotalPrice and OrderLine.ActualTotalPrice

Close #94
pull/96/head
gdlcf88 6 years ago
parent
commit
589dd11c56
  1. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderDto.cs
  2. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application.Contracts/EasyAbp/EShop/Orders/Orders/Dtos/OrderLineDto.cs
  3. 9
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs
  4. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/cs.json
  5. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/en.json
  6. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pl.json
  7. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/pt-BR.json
  8. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/sl.json
  9. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/tr.json
  10. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/vi.json
  11. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hans.json
  12. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Localization/Orders/zh-Hant.json
  13. 5
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrder.cs
  14. 5
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/IOrderLine.cs
  15. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderEto.cs
  16. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain.Shared/EasyAbp/EShop/Orders/Orders/OrderLineEto.cs
  17. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/Order.cs
  18. 4
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderLine.cs
  19. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Domain/EasyAbp/EShop/Orders/Orders/OrderPaymentChecker.cs
  20. 2
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.EntityFrameworkCore/EasyAbp/EShop/Orders/EntityFrameworkCore/OrdersDbContextModelCreatingExtensions.cs
  21. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.Application/EasyAbp/EShop/Payments/Payments/PaymentAppService.cs
  22. 2
      modules/EasyAbp.EShop.Stores/src/EasyAbp.EShop.Stores.Domain/EasyAbp/EShop/Stores/Transactions/OrderCompletedEventHandler.cs
  23. 4231
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.Designer.cs
  24. 35
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.cs
  25. 6
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

2
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; }

2
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; }

9
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
);
}

2
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",

2
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",

2
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",

2
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",

2
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",

2
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",

2
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",

2
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",

2
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",

5
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; }
/// <summary>
/// ActualTotalPrice = TotalPrice - TotalDiscount
/// </summary>
decimal ActualTotalPrice { get; }
decimal RefundAmount { get; }

5
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; }
/// <summary>
/// ActualTotalPrice = TotalPrice - TotalDiscount
/// </summary>
decimal ActualTotalPrice { get; }
int Quantity { get; }

2
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; }

2
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; }

4
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;

4
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;

2
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<bool> IsPaymentPriceCorrectAsync(Order order, EShopPaymentItemEto paymentItem)
{
return Task.FromResult(order.TotalPrice == paymentItem.OriginalPaymentAmount);
return Task.FromResult(order.ActualTotalPrice == paymentItem.OriginalPaymentAmount);
}
protected virtual Task<bool> IsUserAllowedToPayAsync(Order order, EShopPaymentEto payment)

2
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)");
});

2
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<string, object> {{"StoreId", order.StoreId.ToString()}}
}).ToList()
};

2
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);
}

4231
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.Designer.cs

File diff suppressed because it is too large

35
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200831122106_AddedActualTotalPricePropertyToOrderEntity.cs

@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class AddedActualTotalPricePropertyToOrderEntity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "ActualTotalPrice",
table: "EasyAbpEShopOrdersOrders",
type: "decimal(20,8)",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<decimal>(
name: "ActualTotalPrice",
table: "EasyAbpEShopOrdersOrderLines",
type: "decimal(20,8)",
nullable: false,
defaultValue: 0m);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ActualTotalPrice",
table: "EasyAbpEShopOrdersOrders");
migrationBuilder.DropColumn(
name: "ActualTotalPrice",
table: "EasyAbpEShopOrdersOrderLines");
}
}
}

6
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

@ -27,6 +27,9 @@ namespace EShopSample.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualTotalPrice")
.HasColumnType("decimal(20,8)");
b.Property<DateTime?>("CanceledTime")
.HasColumnType("datetime2");
@ -140,6 +143,9 @@ namespace EShopSample.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<decimal>("ActualTotalPrice")
.HasColumnType("decimal(20,8)");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime")
.HasColumnType("datetime2");

Loading…
Cancel
Save