Browse Source

Configure ColumnType of PendingRefundAmount

pull/87/head
gdlcf88 6 years ago
parent
commit
c5877b46a1
  1. 2
      modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs
  2. 3601
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200624191051_AddedColumnTypeOfPendingRefundAmount.Designer.cs
  3. 45
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200624191051_AddedColumnTypeOfPendingRefundAmount.cs
  4. 4
      samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/EShopSampleMigrationsDbContextModelSnapshot.cs

2
modules/EasyAbp.EShop.Payments/src/EasyAbp.EShop.Payments.EntityFrameworkCore/EasyAbp/EShop/Payments/EntityFrameworkCore/PaymentsDbContextModelCreatingExtensions.cs

@ -51,6 +51,7 @@ namespace EasyAbp.EShop.Payments.EntityFrameworkCore
b.Property(x => x.OriginalPaymentAmount).HasColumnType("decimal(20,8)"); b.Property(x => x.OriginalPaymentAmount).HasColumnType("decimal(20,8)");
b.Property(x => x.PaymentDiscount).HasColumnType("decimal(20,8)"); b.Property(x => x.PaymentDiscount).HasColumnType("decimal(20,8)");
b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)"); b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)");
b.Property(x => x.PendingRefundAmount).HasColumnType("decimal(20,8)");
}); });
builder.Entity<Refund>(b => builder.Entity<Refund>(b =>
@ -70,6 +71,7 @@ namespace EasyAbp.EShop.Payments.EntityFrameworkCore
b.Property(x => x.OriginalPaymentAmount).HasColumnType("decimal(20,8)"); b.Property(x => x.OriginalPaymentAmount).HasColumnType("decimal(20,8)");
b.Property(x => x.PaymentDiscount).HasColumnType("decimal(20,8)"); b.Property(x => x.PaymentDiscount).HasColumnType("decimal(20,8)");
b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)"); b.Property(x => x.RefundAmount).HasColumnType("decimal(20,8)");
b.Property(x => x.PendingRefundAmount).HasColumnType("decimal(20,8)");
}); });
} }
} }

3601
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200624191051_AddedColumnTypeOfPendingRefundAmount.Designer.cs

File diff suppressed because it is too large

45
samples/EShopSample/aspnet-core/src/EShopSample.EntityFrameworkCore.DbMigrations/Migrations/20200624191051_AddedColumnTypeOfPendingRefundAmount.cs

@ -0,0 +1,45 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace EShopSample.Migrations
{
public partial class AddedColumnTypeOfPendingRefundAmount : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EShopPaymentsPayments",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EShopPaymentsPaymentItems",
type: "decimal(20,8)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EShopPaymentsPayments",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
migrationBuilder.AlterColumn<decimal>(
name: "PendingRefundAmount",
table: "EShopPaymentsPaymentItems",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(20,8)");
}
}
}

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

@ -285,7 +285,7 @@ namespace EShopSample.Migrations
.HasColumnType("nvarchar(max)"); .HasColumnType("nvarchar(max)");
b.Property<decimal>("PendingRefundAmount") b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,2)"); .HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount") b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(20,8)"); .HasColumnType("decimal(20,8)");
@ -363,7 +363,7 @@ namespace EShopSample.Migrations
.HasColumnType("uniqueidentifier"); .HasColumnType("uniqueidentifier");
b.Property<decimal>("PendingRefundAmount") b.Property<decimal>("PendingRefundAmount")
.HasColumnType("decimal(18,2)"); .HasColumnType("decimal(20,8)");
b.Property<decimal>("RefundAmount") b.Property<decimal>("RefundAmount")
.HasColumnType("decimal(20,8)"); .HasColumnType("decimal(20,8)");

Loading…
Cancel
Save