Stable run on Notification creation
This commit is contained in:
@@ -17,12 +17,81 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "10.0.7")
|
||||
.HasAnnotation("ProductVersion", "10.0.8")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Customer", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.CartPackages.Entities.Package", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Summary")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Package", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.CartPackages.Entities.PackageItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<Guid>("PackageId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ProductPriceId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PackageId");
|
||||
|
||||
b.HasIndex("ProductPriceId");
|
||||
|
||||
b.ToTable("PackageItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Customers.Entities.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -45,7 +114,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -83,7 +152,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<string>("Tax")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Website")
|
||||
@@ -94,10 +163,78 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Customer", (string)null);
|
||||
b.ToTable("Customers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Lead", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Customers.Models.Customer", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("City")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Company")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Country")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Discord")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LastName")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("LinkedIn")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Phone")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("PostalCode")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Region")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Slack")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Tax")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("Website")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Whatsapp")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Customer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Leads.Entities.Lead", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -125,7 +262,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<string>("ClickLocation")
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -133,6 +270,9 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<Guid?>("CustomerId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("CustomerId1")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<long?>("FeedItemId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -145,7 +285,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<long?>("TargetId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("WebClickId")
|
||||
@@ -155,10 +295,12 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
|
||||
b.HasIndex("CustomerId");
|
||||
|
||||
b.ToTable("Lead", (string)null);
|
||||
b.HasIndex("CustomerId1");
|
||||
|
||||
b.ToTable("Leads", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Notification", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Notifications.Entities.Notification", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -171,7 +313,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<int>("CorrelationIdType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -212,15 +354,15 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
.HasColumnType("boolean")
|
||||
.HasDefaultValue(false);
|
||||
|
||||
b.Property<string>("Recipient")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("RecipientAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Sender")
|
||||
b.Property<string>("RecipientName")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("SenderAddress")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
@@ -231,7 +373,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -239,13 +381,13 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.ToTable("Notification", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Orders.Entities.Order", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -269,17 +411,17 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.PrimitiveCollection<string>("Terms")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CustomerId");
|
||||
|
||||
b.ToTable("Order", (string)null);
|
||||
b.ToTable("Orders", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Orders.Entities.OrderRefund", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -289,7 +431,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("numeric(18,2)");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -305,79 +447,10 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("OrderRefund", (string)null);
|
||||
b.ToTable("OrderRefunds", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Package", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("ImageUrl")
|
||||
.HasMaxLength(2048)
|
||||
.HasColumnType("character varying(2048)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<string>("Summary")
|
||||
.IsRequired()
|
||||
.HasMaxLength(512)
|
||||
.HasColumnType("character varying(512)");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Package", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.PackageItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<Guid>("PackageId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid>("ProductPriceId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("PackageId");
|
||||
|
||||
b.HasIndex("ProductPriceId");
|
||||
|
||||
b.ToTable("PackageItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Product", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Products.Entities.Product", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -411,10 +484,10 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Product", (string)null);
|
||||
b.ToTable("Products", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Products.Entities.ProductPrice", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -423,7 +496,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<bool>("Active")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -439,23 +512,23 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<Guid>("ProductId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProductId");
|
||||
|
||||
b.ToTable("ProductPrice", (string)null);
|
||||
b.ToTable("ProductPrices", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Quote", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Quotes.Entities.Quote", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -463,7 +536,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<Guid>("CustomerId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset?>("ExpiredAt")
|
||||
b.Property<DateTime?>("ExpiredAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("InvoiceUrl")
|
||||
@@ -482,7 +555,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -495,16 +568,16 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.HasIndex("ShoppingCartId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Quote", (string)null);
|
||||
b.ToTable("Quotes", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCart", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -515,7 +588,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Property<Guid?>("OrderId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset?>("UpdatedAt")
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
@@ -525,46 +598,60 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.HasIndex("OrderId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("ShoppingCart", (string)null);
|
||||
b.ToTable("ShoppingCarts", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCartItem", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCartItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
|
||||
b.Property<Guid>("ProductPriceId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<Guid?>("ProductPriceId1")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("integer");
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<Guid>("ShoppingCartId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
b.Property<Guid?>("ShoppingCartId1")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime?>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProductPriceId");
|
||||
|
||||
b.HasIndex("ProductPriceId1");
|
||||
|
||||
b.HasIndex("ShoppingCartId");
|
||||
|
||||
b.ToTable("ShoppingCartItems");
|
||||
b.HasIndex("ShoppingCartId1");
|
||||
|
||||
b.ToTable("ShoppingCartItems", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCartPackage", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCartPackage", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasDefaultValueSql("now()");
|
||||
@@ -581,49 +668,18 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
|
||||
b.HasIndex("ShoppingCartId");
|
||||
|
||||
b.ToTable("ShoppingCartPackage", (string)null);
|
||||
b.ToTable("ShoppingCartPackages", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Lead", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.CartPackages.Entities.PackageItem", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
||||
.WithMany("Leads")
|
||||
.HasForeignKey("CustomerId");
|
||||
|
||||
b.Navigation("Customer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("CustomerId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Customer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Order", "Order")
|
||||
.WithMany("Refunds")
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.PackageItem", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Package", "Package")
|
||||
b.HasOne("LiteCharms.Features.Shop.CartPackages.Entities.Package", "Package")
|
||||
.WithMany("PackageItems")
|
||||
.HasForeignKey("PackageId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Entities.ProductPrice", "ProductPrice")
|
||||
b.HasOne("LiteCharms.Features.Shop.Products.Entities.ProductPrice", "ProductPrice")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductPriceId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -634,9 +690,45 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("ProductPrice");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Leads.Entities.Lead", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Product", "Product")
|
||||
b.HasOne("LiteCharms.Features.Shop.Customers.Models.Customer", "Customer")
|
||||
.WithMany()
|
||||
.HasForeignKey("CustomerId")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("LiteCharms.Features.Shop.Customers.Entities.Customer", null)
|
||||
.WithMany("Leads")
|
||||
.HasForeignKey("CustomerId1");
|
||||
|
||||
b.Navigation("Customer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Orders.Entities.Order", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Features.Shop.Customers.Entities.Customer", "Customer")
|
||||
.WithMany("Orders")
|
||||
.HasForeignKey("CustomerId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Customer");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Orders.Entities.OrderRefund", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Features.Shop.Orders.Entities.Order", "Order")
|
||||
.WithMany("Refunds")
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Products.Entities.ProductPrice", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Features.Shop.Products.Entities.Product", "Product")
|
||||
.WithMany("ProductPrices")
|
||||
.HasForeignKey("ProductId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
@@ -645,21 +737,21 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("Product");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Quote", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Quotes.Entities.Quote", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
||||
b.HasOne("LiteCharms.Features.Shop.Customers.Entities.Customer", "Customer")
|
||||
.WithMany("Quotes")
|
||||
.HasForeignKey("CustomerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Entities.Order", "Order")
|
||||
b.HasOne("LiteCharms.Features.Shop.Orders.Entities.Order", "Order")
|
||||
.WithOne("Quote")
|
||||
.HasForeignKey("LiteCharms.Entities.Quote", "OrderId");
|
||||
.HasForeignKey("LiteCharms.Features.Shop.Quotes.Entities.Quote", "OrderId");
|
||||
|
||||
b.HasOne("LiteCharms.Entities.ShoppingCart", "ShoppingCart")
|
||||
b.HasOne("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", "ShoppingCart")
|
||||
.WithOne("Quote")
|
||||
.HasForeignKey("LiteCharms.Entities.Quote", "ShoppingCartId");
|
||||
.HasForeignKey("LiteCharms.Features.Shop.Quotes.Entities.Quote", "ShoppingCartId");
|
||||
|
||||
b.Navigation("Customer");
|
||||
|
||||
@@ -668,17 +760,17 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("ShoppingCart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCart", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Customer", "Customer")
|
||||
b.HasOne("LiteCharms.Features.Shop.Customers.Entities.Customer", "Customer")
|
||||
.WithMany("ShoppingCarts")
|
||||
.HasForeignKey("CustomerId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Entities.Order", "Order")
|
||||
b.HasOne("LiteCharms.Features.Shop.Orders.Entities.Order", "Order")
|
||||
.WithOne("ShoppingCart")
|
||||
.HasForeignKey("LiteCharms.Entities.ShoppingCart", "OrderId")
|
||||
.HasForeignKey("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", "OrderId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.Navigation("Customer");
|
||||
@@ -686,34 +778,42 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCartItem", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCartItem", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.ProductPrice", "ProductPrice")
|
||||
b.HasOne("LiteCharms.Features.Shop.Products.Entities.ProductPrice", null)
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductPriceId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Entities.ShoppingCart", "ShoppingCart")
|
||||
b.HasOne("LiteCharms.Features.Shop.Products.Entities.ProductPrice", "ProductPrice")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProductPriceId1");
|
||||
|
||||
b.HasOne("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", null)
|
||||
.WithMany("ShoppingCartItems")
|
||||
.HasForeignKey("ShoppingCartId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", "ShoppingCart")
|
||||
.WithMany()
|
||||
.HasForeignKey("ShoppingCartId1");
|
||||
|
||||
b.Navigation("ProductPrice");
|
||||
|
||||
b.Navigation("ShoppingCart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCartPackage", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCartPackage", b =>
|
||||
{
|
||||
b.HasOne("LiteCharms.Entities.Package", "Package")
|
||||
b.HasOne("LiteCharms.Features.Shop.CartPackages.Entities.Package", "Package")
|
||||
.WithMany()
|
||||
.HasForeignKey("PackageId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiteCharms.Entities.ShoppingCart", "ShoppingCart")
|
||||
b.HasOne("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", "ShoppingCart")
|
||||
.WithMany("ShoppingCartPackages")
|
||||
.HasForeignKey("ShoppingCartId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -724,7 +824,12 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("ShoppingCart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Customer", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.CartPackages.Entities.Package", b =>
|
||||
{
|
||||
b.Navigation("PackageItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Customers.Entities.Customer", b =>
|
||||
{
|
||||
b.Navigation("Leads");
|
||||
|
||||
@@ -735,7 +840,7 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("ShoppingCarts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Order", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Orders.Entities.Order", b =>
|
||||
{
|
||||
b.Navigation("Quote");
|
||||
|
||||
@@ -744,17 +849,12 @@ namespace LiteCharms.Features.Shop.Postgres.Migrations
|
||||
b.Navigation("ShoppingCart");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Package", b =>
|
||||
{
|
||||
b.Navigation("PackageItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.Product", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.Products.Entities.Product", b =>
|
||||
{
|
||||
b.Navigation("ProductPrices");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiteCharms.Entities.ShoppingCart", b =>
|
||||
modelBuilder.Entity("LiteCharms.Features.Shop.ShoppingCarts.Entities.ShoppingCart", b =>
|
||||
{
|
||||
b.Navigation("Quote");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user