// using System; using LiteCharms.Infrastructure.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace LiteCharms.Infrastructure.Database.Migrations { [DbContext(typeof(LeadGeneratorDbContext))] [Migration("20260505124135_AddedProcessedColumnToNotifications")] partial class AddedProcessedColumnToNotifications { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.7") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("LiteCharms.Entities.Customer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Active") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Address") .HasColumnType("text"); b.Property("City") .HasColumnType("text"); b.Property("Company") .HasColumnType("text"); b.Property("Country") .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("Discord") .HasColumnType("text"); b.Property("Email") .IsRequired() .HasColumnType("text"); b.Property("LastName") .IsRequired() .HasColumnType("text"); b.Property("LinkedIn") .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Phone") .HasColumnType("text"); b.Property("PostalCode") .HasColumnType("text"); b.Property("Region") .HasColumnType("text"); b.Property("Slack") .HasColumnType("text"); b.Property("Tax") .HasColumnType("text"); b.Property("UpdatedAt") .ValueGeneratedOnUpdate() .HasColumnType("timestamp with time zone"); b.Property("Website") .HasColumnType("text"); b.Property("Whatsapp") .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Customer", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.Lead", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("AdGroupId") .HasColumnType("bigint"); b.Property("AdName") .HasColumnType("bigint"); b.Property("AppClickId") .HasColumnType("text"); b.Property("AttributionHash") .IsRequired() .HasColumnType("text"); b.Property("CampaignId") .HasColumnType("bigint"); b.Property("ClickId") .HasColumnType("text"); b.Property("ClickLocation") .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("CustomerId") .HasColumnType("uuid"); b.Property("FeedItemId") .HasColumnType("bigint"); b.Property("Source") .HasColumnType("text"); b.Property("Status") .HasColumnType("integer"); b.Property("TargetId") .HasColumnType("bigint"); b.Property("UpdatedAt") .ValueGeneratedOnUpdate() .HasColumnType("timestamp with time zone"); b.Property("WebClickId") .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("CustomerId"); b.ToTable("Lead", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.Notification", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Author") .IsRequired() .HasColumnType("text"); b.Property("CorrelationId") .IsRequired() .HasColumnType("text"); b.Property("CorrelationIdType") .IsRequired() .HasColumnType("text"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("Description") .IsRequired() .HasColumnType("text"); b.Property("Direction") .HasColumnType("integer"); b.Property("IsInternal") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Platform") .IsRequired() .HasColumnType("text"); b.Property("PlatformAddress") .IsRequired() .HasColumnType("text"); b.Property("Processed") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(false); b.Property("Title") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Notification", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.Order", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("CustomerId") .HasColumnType("uuid"); b.PrimitiveCollection("Notes") .HasColumnType("jsonb"); b.Property("ProductPriceId") .HasColumnType("uuid"); b.Property("RefundId") .HasColumnType("uuid"); b.Property("Status") .HasColumnType("integer"); b.Property("UpdatedAt") .ValueGeneratedOnUpdate() .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("CustomerId"); b.HasIndex("ProductPriceId"); b.ToTable("Order", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Amount") .HasPrecision(18, 2) .HasColumnType("numeric(18,2)"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("OrderId") .HasColumnType("uuid"); b.Property("Reason") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("OrderId") .IsUnique(); b.ToTable("OrderRefund", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.Product", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Active") .ValueGeneratedOnAdd() .HasColumnType("boolean") .HasDefaultValue(true); b.Property("Description") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Product", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Active") .HasColumnType("boolean"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("timestamp with time zone"); b.Property("Discount") .HasPrecision(18, 2) .HasColumnType("numeric(18,2)"); b.Property("Price") .HasPrecision(18, 2) .HasColumnType("numeric(18,2)"); b.Property("ProductId") .HasColumnType("uuid"); b.Property("UpdatedAt") .ValueGeneratedOnUpdate() .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.HasIndex("ProductId"); b.ToTable("ProductPrice", (string)null); }); modelBuilder.Entity("LiteCharms.Entities.Lead", b => { b.HasOne("LiteCharms.Entities.Customer", "Customer") .WithMany("Leads") .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.NoAction); b.Navigation("Customer"); }); modelBuilder.Entity("LiteCharms.Entities.Order", b => { b.HasOne("LiteCharms.Entities.Customer", "Customer") .WithMany("Orders") .HasForeignKey("CustomerId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("LiteCharms.Entities.ProductPrice", "ProductPrice") .WithMany() .HasForeignKey("ProductPriceId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Customer"); b.Navigation("ProductPrice"); }); modelBuilder.Entity("LiteCharms.Entities.OrderRefund", b => { b.HasOne("LiteCharms.Entities.Order", "Order") .WithOne("Refund") .HasForeignKey("LiteCharms.Entities.OrderRefund", "OrderId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Order"); }); modelBuilder.Entity("LiteCharms.Entities.ProductPrice", b => { b.HasOne("LiteCharms.Entities.Product", "Product") .WithMany("ProductPrices") .HasForeignKey("ProductId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Product"); }); modelBuilder.Entity("LiteCharms.Entities.Customer", b => { b.Navigation("Leads"); b.Navigation("Orders"); }); modelBuilder.Entity("LiteCharms.Entities.Order", b => { b.Navigation("Refund"); }); modelBuilder.Entity("LiteCharms.Entities.Product", b => { b.Navigation("ProductPrices"); }); #pragma warning restore 612, 618 } } }