update
This commit is contained in:
1318
src/CMSMicroservice.Infrastructure/Persistence/Migrations/20251124213641_u10.Designer.cs
generated
Normal file
1318
src/CMSMicroservice.Infrastructure/Persistence/Migrations/20251124213641_u10.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,340 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class u10 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Transactionss_UserOrders_OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_UserOrders_Packages_PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_UserOrders_UserAddresss_UserAddressId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Transactionss_OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Authority",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CallbackUrl",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CardHash",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CardPan",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Currency",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Email",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Fee",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FeeType",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "MerchantId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Mobile",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequestStatusCode",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RequestStatusMessage",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VerificationStatusCode",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "VerificationStatusMessage",
|
||||
schema: "CMS",
|
||||
table: "Transactionss");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Price",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
newName: "Amount");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
type: "bigint",
|
||||
nullable: true,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_UserOrders_TransactionId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "TransactionId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserOrders_Packages_PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "PackageId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "Packages",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserOrders_Transactionss_TransactionId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "TransactionId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "Transactionss",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserOrders_UserAddresss_UserAddressId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "UserAddressId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "UserAddresss",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_UserOrders_Packages_PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_UserOrders_Transactionss_TransactionId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_UserOrders_UserAddresss_UserAddressId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_UserOrders_TransactionId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "Amount",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
newName: "Price");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Authority",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CallbackUrl",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CardHash",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "CardPan",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Currency",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Email",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Fee",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "bigint",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FeeType",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "MerchantId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Mobile",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "bigint",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "RequestStatusCode",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RequestStatusMessage",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "VerificationStatusCode",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "VerificationStatusMessage",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Transactionss_OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
column: "OrderId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Transactionss_UserOrders_OrderId",
|
||||
schema: "CMS",
|
||||
table: "Transactionss",
|
||||
column: "OrderId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "UserOrders",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserOrders_Packages_PackageId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "PackageId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "Packages",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_UserOrders_UserAddresss_UserAddressId",
|
||||
schema: "CMS",
|
||||
table: "UserOrders",
|
||||
column: "UserAddressId",
|
||||
principalSchema: "CMS",
|
||||
principalTable: "UserAddresss",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,41 +580,16 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Property<long>("Amount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Authority")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CallbackUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CardHash")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CardPan")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CreatedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("Currency")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long?>("Fee")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FeeType")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -624,16 +599,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Property<string>("LastModifiedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MerchantId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Mobile")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long?>("OrderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime?>("PaymentDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
@@ -643,25 +608,11 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Property<string>("RefId")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("RequestStatusCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("RequestStatusMessage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("VerificationStatusCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VerificationStatusMessage")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Transactionss", "CMS");
|
||||
});
|
||||
|
||||
@@ -891,6 +842,9 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<long>("Amount")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
@@ -906,7 +860,7 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Property<string>("LastModifiedBy")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("PackageId")
|
||||
b.Property<long?>("PackageId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime?>("PaymentDate")
|
||||
@@ -918,9 +872,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Property<int>("PaymentStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<long>("Price")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long?>("TransactionId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -934,6 +885,8 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
|
||||
b.HasIndex("PackageId");
|
||||
|
||||
b.HasIndex("TransactionId");
|
||||
|
||||
b.HasIndex("UserAddressId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
@@ -1145,15 +1098,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("Tag");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Transactions", b =>
|
||||
{
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.UserOrder", "Order")
|
||||
.WithMany("Transactionss")
|
||||
.HasForeignKey("OrderId");
|
||||
|
||||
b.Navigation("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.User", b =>
|
||||
{
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.User", "Parent")
|
||||
@@ -1216,14 +1160,16 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
{
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.Package", "Package")
|
||||
.WithMany("UserOrders")
|
||||
.HasForeignKey("PackageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
.HasForeignKey("PackageId");
|
||||
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.Transactions", "Transaction")
|
||||
.WithMany("UserOrders")
|
||||
.HasForeignKey("TransactionId");
|
||||
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.UserAddress", "UserAddress")
|
||||
.WithMany("UserOrders")
|
||||
.HasForeignKey("UserAddressId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.OnDelete(DeleteBehavior.NoAction)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("CMSMicroservice.Domain.Entities.User", "User")
|
||||
@@ -1234,6 +1180,8 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
|
||||
b.Navigation("Package");
|
||||
|
||||
b.Navigation("Transaction");
|
||||
|
||||
b.Navigation("User");
|
||||
|
||||
b.Navigation("UserAddress");
|
||||
@@ -1325,6 +1273,11 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
b.Navigation("PruductTags");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.Transactions", b =>
|
||||
{
|
||||
b.Navigation("UserOrders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.User", b =>
|
||||
{
|
||||
b.Navigation("UserAddresss");
|
||||
@@ -1350,8 +1303,6 @@ namespace CMSMicroservice.Infrastructure.Persistence.Migrations
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.UserOrder", b =>
|
||||
{
|
||||
b.Navigation("FactorDetailss");
|
||||
|
||||
b.Navigation("Transactionss");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("CMSMicroservice.Domain.Entities.UserWallet", b =>
|
||||
|
||||
Reference in New Issue
Block a user