Added payment gateway ledger service to payments feature
This commit is contained in:
+76
-15
@@ -615,6 +615,60 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
b.ToTable("Gateways", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.MidrandBooks.Payments.Entities.PaymentGatewayLedger", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<decimal>("AmountFee")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("numeric(18,2)");
|
||||
|
||||
b.Property<decimal>("AmountGross")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("numeric(18,2)");
|
||||
|
||||
b.Property<decimal>("AmountNet")
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("numeric(18,2)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<string>("CustomerEmail")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("MerchantPaymentId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("OrderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("PayfastPaymentId")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("PaymentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("PaymentStatus")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("PaymentId");
|
||||
|
||||
b.ToTable("GatewayLedger", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.MidrandBooks.Payments.Entities.PaymentLedger", b =>
|
||||
{
|
||||
b.Property<long>("Id")
|
||||
@@ -631,15 +685,12 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
b.Property<long>("CustomerId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("MerchantPaymentId")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("OrderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long?>("PaymentGatewayId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("PaymentGatewayReference")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<long>("PaymentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -652,8 +703,6 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("PaymentGatewayId");
|
||||
|
||||
b.HasIndex("PaymentId");
|
||||
|
||||
b.ToTable("Ledger", (string)null);
|
||||
@@ -1062,6 +1111,25 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
b.Navigation("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.MidrandBooks.Payments.Entities.PaymentGatewayLedger", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Features.MidrandBooks.Orders.Entities.Order", "Order")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Features.MidrandBooks.Payments.Entities.Payment", "Payment")
|
||||
.WithMany()
|
||||
.HasForeignKey("PaymentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Order");
|
||||
|
||||
b.Navigation("Payment");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.MidrandBooks.Payments.Entities.PaymentLedger", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Features.MidrandBooks.Customers.Entities.Customer", "Customer")
|
||||
@@ -1076,11 +1144,6 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Features.MidrandBooks.Payments.Entities.PaymentGateway", "Gateway")
|
||||
.WithMany()
|
||||
.HasForeignKey("PaymentGatewayId")
|
||||
.OnDelete(DeleteBehavior.Cascade);
|
||||
|
||||
b.HasOne("LiteCharms.Features.MidrandBooks.Payments.Entities.Payment", "Payment")
|
||||
.WithMany()
|
||||
.HasForeignKey("PaymentId")
|
||||
@@ -1089,8 +1152,6 @@ namespace LiteCharms.Features.MidrandBooks.Postgres.Migrations
|
||||
|
||||
b.Navigation("Customer");
|
||||
|
||||
b.Navigation("Gateway");
|
||||
|
||||
b.Navigation("Order");
|
||||
|
||||
b.Navigation("Payment");
|
||||
|
||||
Reference in New Issue
Block a user