// using System; using BLAIzor.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace BLAIzor.Migrations { [DbContext(typeof(ApplicationDbContext))] [Migration("20250625185236_StoredCollectionName")] partial class StoredCollectionName { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "9.0.3") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("BLAIzor.Models.ContentChunk", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ChunkIndex") .HasColumnType("int"); b.Property("ContentItemId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("QdrantPointId") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("VectorHash") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ContentItemId"); b.ToTable("ContentChunks"); }); modelBuilder.Entity("BLAIzor.Models.ContentGroup", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("EmbeddingModel") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastUpdated") .HasColumnType("datetime2"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SiteInfoId") .HasColumnType("int"); b.Property("Slug") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Type") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("VectorSize") .HasColumnType("int"); b.Property("Version") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("SiteInfoId"); b.ToTable("ContentGroups"); }); modelBuilder.Entity("BLAIzor.Models.ContentItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Content") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ContentGroupId") .HasColumnType("int"); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IsPublished") .HasColumnType("bit"); b.Property("Language") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("LastUpdated") .HasColumnType("datetime2"); b.Property("Tags") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Title") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Version") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ContentGroupId"); b.ToTable("ContentItems"); }); modelBuilder.Entity("BLAIzor.Models.CssTemplate", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CssContent") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DesignTemplateId") .HasColumnType("int"); b.Property("LastUpdated") .HasColumnType("datetime2"); b.HasKey("Id"); b.HasIndex("DesignTemplateId") .IsUnique(); b.ToTable("CssTemplates"); }); modelBuilder.Entity("BLAIzor.Models.DesignTemplate", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("Description") .HasColumnType("nvarchar(max)"); b.Property("IsDeprecated") .HasColumnType("bit"); b.Property("IsPrivate") .HasColumnType("bit"); b.Property("IsPublished") .HasColumnType("bit"); b.Property("QDrandCollectionName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Status") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Tags") .HasColumnType("nvarchar(max)"); b.Property("TemplateName") .HasColumnType("nvarchar(max)"); b.Property("TemplatePhotoUrl") .HasColumnType("nvarchar(max)"); b.Property("UpdatedAt") .HasColumnType("datetime2"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.Property("Version") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("DesignTemplates"); b.HasData( new { Id = 1, CreatedAt = new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), Description = "The default template", IsDeprecated = false, IsPrivate = false, IsPublished = false, QDrandCollectionName = "html_snippets", Status = "Draft", Tags = "system", TemplateName = "Default Site", TemplatePhotoUrl = "/images/default-logo.png", UserId = "0988758e-e16c-4c2c-8c1e-efa3ac5f0274", Version = 1 }); }); modelBuilder.Entity("BLAIzor.Models.FormDefinition", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CreatedAt") .HasColumnType("datetime2"); b.Property("Description") .HasColumnType("nvarchar(max)"); b.Property("JsonDefinition") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SiteInfoId") .HasColumnType("int"); b.Property("Slug") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Title") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Version") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("SiteInfoId", "Slug") .IsUnique(); b.ToTable("FormDefinitions"); }); modelBuilder.Entity("BLAIzor.Models.MenuItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ContentGroupId") .HasColumnType("int"); b.Property("ContentItemId") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ParentId") .HasColumnType("int"); b.Property("ShowInMainMenu") .HasColumnType("bit"); b.Property("SiteInfoId") .HasColumnType("int"); b.Property("Slug") .HasColumnType("nvarchar(max)"); b.Property("SortOrder") .HasColumnType("int"); b.Property("StoredHtml") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ContentGroupId"); b.HasIndex("ContentItemId"); b.HasIndex("ParentId"); b.HasIndex("SiteInfoId"); b.ToTable("MenuItems"); }); modelBuilder.Entity("BLAIzor.Models.SiteInfo", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BackgroundVideo") .HasColumnType("nvarchar(max)"); b.Property("BrandLogoUrl") .HasColumnType("nvarchar(max)"); b.Property("DefaultColor") .HasColumnType("nvarchar(max)"); b.Property("DefaultLanguage") .HasColumnType("nvarchar(max)"); b.Property("DefaultUrl") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("DomainUrl") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("EmbeddingService") .HasColumnType("nvarchar(max)"); b.Property("Entity") .HasColumnType("nvarchar(max)"); b.Property("IsPublished") .HasColumnType("bit"); b.Property("Persona") .HasColumnType("nvarchar(max)"); b.Property("STTActive") .HasColumnType("bit"); b.Property("SiteDescription") .HasColumnType("nvarchar(max)"); b.Property("SiteName") .HasColumnType("nvarchar(max)"); b.Property("TTSActive") .HasColumnType("bit"); b.Property("TemplateId") .HasColumnType("int"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.Property("VectorCollectionName") .HasColumnType("nvarchar(max)"); b.Property("VoiceId") .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("TemplateId"); b.HasIndex("UserId"); b.ToTable("SiteInfos"); b.HasData( new { Id = 1, BrandLogoUrl = "/images/default-logo.png", DefaultColor = "#FFFFFF", DefaultUrl = "https://ai.poppixel.cloud", DomainUrl = "poppixel.cloud", IsPublished = false, STTActive = false, SiteName = "Default Site", TTSActive = false, TemplateId = 1, UserId = "0988758e-e16c-4c2c-8c1e-efa3ac5f0274" }); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => { b.Property("Id") .HasColumnType("nvarchar(450)"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("Name") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("NormalizedName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.HasKey("Id"); b.HasIndex("NormalizedName") .IsUnique() .HasDatabaseName("RoleNameIndex") .HasFilter("[NormalizedName] IS NOT NULL"); b.ToTable("AspNetRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("RoleId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("RoleId"); b.ToTable("AspNetRoleClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b => { b.Property("Id") .HasColumnType("nvarchar(450)"); b.Property("AccessFailedCount") .HasColumnType("int"); b.Property("ConcurrencyStamp") .IsConcurrencyToken() .HasColumnType("nvarchar(max)"); b.Property("Email") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("EmailConfirmed") .HasColumnType("bit"); b.Property("LockoutEnabled") .HasColumnType("bit"); b.Property("LockoutEnd") .HasColumnType("datetimeoffset"); b.Property("NormalizedEmail") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("NormalizedUserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.Property("PasswordHash") .HasColumnType("nvarchar(max)"); b.Property("PhoneNumber") .HasColumnType("nvarchar(max)"); b.Property("PhoneNumberConfirmed") .HasColumnType("bit"); b.Property("SecurityStamp") .HasColumnType("nvarchar(max)"); b.Property("TwoFactorEnabled") .HasColumnType("bit"); b.Property("UserName") .HasMaxLength(256) .HasColumnType("nvarchar(256)"); b.HasKey("Id"); b.HasIndex("NormalizedEmail") .HasDatabaseName("EmailIndex"); b.HasIndex("NormalizedUserName") .IsUnique() .HasDatabaseName("UserNameIndex") .HasFilter("[NormalizedUserName] IS NOT NULL"); b.ToTable("AspNetUsers", (string)null); b.HasData( new { Id = "0988758e-e16c-4c2c-8c1e-efa3ac5f0274", AccessFailedCount = 0, ConcurrencyStamp = "a2836246-0303-4370-b283-e53a9a3f2813", Email = "adam.g@aycode.com", EmailConfirmed = true, LockoutEnabled = false, NormalizedEmail = "ADAM.G@AYCODE.COM", NormalizedUserName = "ADAM.G@AYCODE.COM", PasswordHash = "AQAAAAIAAYagAAAAEChxKCu+ReGvcZFR/6kPASbpnQdMp1MJuepeRyR4bfHTkUk8SfNAqmckGXvuw+GaGA==", PhoneNumberConfirmed = false, SecurityStamp = "7ecf121a-b0e7-4e30-a1f1-299eeaf0a9cc", TwoFactorEnabled = false, UserName = "adam.g@aycode.com" }); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClaimType") .HasColumnType("nvarchar(max)"); b.Property("ClaimValue") .HasColumnType("nvarchar(max)"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("AspNetUserClaims", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.Property("ProviderKey") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.Property("ProviderDisplayName") .HasColumnType("nvarchar(max)"); b.Property("UserId") .IsRequired() .HasColumnType("nvarchar(450)"); b.HasKey("LoginProvider", "ProviderKey"); b.HasIndex("UserId"); b.ToTable("AspNetUserLogins", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.Property("UserId") .HasColumnType("nvarchar(450)"); b.Property("RoleId") .HasColumnType("nvarchar(450)"); b.HasKey("UserId", "RoleId"); b.HasIndex("RoleId"); b.ToTable("AspNetUserRoles", (string)null); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.Property("UserId") .HasColumnType("nvarchar(450)"); b.Property("LoginProvider") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.Property("Name") .HasMaxLength(128) .HasColumnType("nvarchar(128)"); b.Property("Value") .HasColumnType("nvarchar(max)"); b.HasKey("UserId", "LoginProvider", "Name"); b.ToTable("AspNetUserTokens", (string)null); }); modelBuilder.Entity("BLAIzor.Models.ContentChunk", b => { b.HasOne("BLAIzor.Models.ContentItem", "ContentItem") .WithMany("Chunks") .HasForeignKey("ContentItemId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ContentItem"); }); modelBuilder.Entity("BLAIzor.Models.ContentGroup", b => { b.HasOne("BLAIzor.Models.SiteInfo", "SiteInfo") .WithMany("ContentGroups") .HasForeignKey("SiteInfoId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SiteInfo"); }); modelBuilder.Entity("BLAIzor.Models.ContentItem", b => { b.HasOne("BLAIzor.Models.ContentGroup", "ContentGroup") .WithMany("Items") .HasForeignKey("ContentGroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ContentGroup"); }); modelBuilder.Entity("BLAIzor.Models.CssTemplate", b => { b.HasOne("BLAIzor.Models.DesignTemplate", "DesignTemplate") .WithOne("CssTemplate") .HasForeignKey("BLAIzor.Models.CssTemplate", "DesignTemplateId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("DesignTemplate"); }); modelBuilder.Entity("BLAIzor.Models.DesignTemplate", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("BLAIzor.Models.FormDefinition", b => { b.HasOne("BLAIzor.Models.SiteInfo", "SiteInfo") .WithMany("FormDefinitions") .HasForeignKey("SiteInfoId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("SiteInfo"); }); modelBuilder.Entity("BLAIzor.Models.MenuItem", b => { b.HasOne("BLAIzor.Models.ContentGroup", "ContentGroup") .WithMany() .HasForeignKey("ContentGroupId") .OnDelete(DeleteBehavior.NoAction); b.HasOne("BLAIzor.Models.ContentItem", "ContentItem") .WithMany() .HasForeignKey("ContentItemId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("BLAIzor.Models.MenuItem", "Parent") .WithMany("Children") .HasForeignKey("ParentId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("BLAIzor.Models.SiteInfo", "SiteInfo") .WithMany("MenuItems") .HasForeignKey("SiteInfoId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("ContentGroup"); b.Navigation("ContentItem"); b.Navigation("Parent"); b.Navigation("SiteInfo"); }); modelBuilder.Entity("BLAIzor.Models.SiteInfo", b => { b.HasOne("BLAIzor.Models.DesignTemplate", "Template") .WithMany("Sites") .HasForeignKey("TemplateId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Template"); b.Navigation("User"); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) .WithMany() .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => { b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null) .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("BLAIzor.Models.ContentGroup", b => { b.Navigation("Items"); }); modelBuilder.Entity("BLAIzor.Models.ContentItem", b => { b.Navigation("Chunks"); }); modelBuilder.Entity("BLAIzor.Models.DesignTemplate", b => { b.Navigation("CssTemplate") .IsRequired(); b.Navigation("Sites"); }); modelBuilder.Entity("BLAIzor.Models.MenuItem", b => { b.Navigation("Children"); }); modelBuilder.Entity("BLAIzor.Models.SiteInfo", b => { b.Navigation("ContentGroups"); b.Navigation("FormDefinitions"); b.Navigation("MenuItems"); }); #pragma warning restore 612, 618 } } }