// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using NovelSoftware.Infrastructure.Persistence; #nullable disable namespace NovelSoftware.Infrastructure.Persistence.Migrations { [DbContext(typeof(NovelDbContext))] partial class NovelDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "10.0.10"); modelBuilder.Entity("NovelSoftware.Domain.Entities.AgentConversation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("ProjectId") .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ProjectId"); b.ToTable("Conversations"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.AgentMessage", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Content") .IsRequired() .HasColumnType("TEXT"); b.Property("ConversationId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("Role") .IsRequired() .HasMaxLength(16) .HasColumnType("TEXT"); b.Property("Sequence") .HasColumnType("INTEGER"); b.Property("ToolCallsJson") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ConversationId", "Sequence") .IsUnique(); b.ToTable("AgentMessages"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Chapter", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("Notes") .HasColumnType("TEXT"); b.Property("Number") .HasColumnType("INTEGER"); b.Property("PovCharacterId") .HasColumnType("TEXT"); b.Property("ProjectId") .HasColumnType("TEXT"); b.Property("Setting") .HasColumnType("TEXT"); b.Property("Status") .IsRequired() .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("Summary") .HasColumnType("TEXT"); b.Property("TargetWordCount") .HasColumnType("INTEGER"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PovCharacterId"); b.HasIndex("ProjectId", "Number"); b.ToTable("Chapters"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Character", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Age") .HasColumnType("TEXT"); b.Property("Appearance") .HasColumnType("TEXT"); b.Property("ArcSummary") .HasColumnType("TEXT"); b.Property("Backstory") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("ExternalConflict") .HasColumnType("TEXT"); b.Property("InternalConflict") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("Need") .HasColumnType("TEXT"); b.Property("Notes") .HasColumnType("TEXT"); b.Property("Occupation") .HasColumnType("TEXT"); b.Property("Personality") .HasColumnType("TEXT"); b.Property("ProjectId") .HasColumnType("TEXT"); b.Property("Pronouns") .HasColumnType("TEXT"); b.Property("Role") .IsRequired() .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.Property("Voice") .HasColumnType("TEXT"); b.Property("Want") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("ProjectId"); b.ToTable("Characters"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.CharacterRelationship", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("CharacterId") .HasColumnType("TEXT"); b.Property("Description") .HasColumnType("TEXT"); b.Property("RelatedCharacterId") .HasColumnType("TEXT"); b.Property("RelationshipType") .IsRequired() .HasMaxLength(120) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CharacterId"); b.HasIndex("RelatedCharacterId"); b.ToTable("CharacterRelationships"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.OutlineNode", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ChapterId") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("NodeType") .IsRequired() .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("ParentId") .HasColumnType("TEXT"); b.Property("ProjectId") .HasColumnType("TEXT"); b.Property("SortOrder") .HasColumnType("INTEGER"); b.Property("Summary") .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ChapterId"); b.HasIndex("ParentId"); b.HasIndex("ProjectId", "ParentId", "SortOrder"); b.ToTable("OutlineNodes"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Project", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("Author") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("Genre") .HasColumnType("TEXT"); b.Property("Logline") .HasColumnType("TEXT"); b.Property("Notes") .HasColumnType("TEXT"); b.Property("Synopsis") .HasColumnType("TEXT"); b.Property("TargetWordCount") .HasColumnType("INTEGER"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Projects"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Scene", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("TEXT"); b.Property("ChapterId") .HasColumnType("TEXT"); b.Property("Conflict") .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("INTEGER"); b.Property("Goal") .HasColumnType("TEXT"); b.Property("Location") .HasColumnType("TEXT"); b.Property("Outcome") .HasColumnType("TEXT"); b.Property("PovCharacterId") .HasColumnType("TEXT"); b.Property("Prose") .HasColumnType("TEXT"); b.Property("SortOrder") .HasColumnType("INTEGER"); b.Property("Status") .IsRequired() .HasMaxLength(32) .HasColumnType("TEXT"); b.Property("Summary") .HasColumnType("TEXT"); b.Property("Title") .IsRequired() .HasMaxLength(300) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("INTEGER"); b.Property("WordCount") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("PovCharacterId"); b.HasIndex("ChapterId", "SortOrder"); b.ToTable("Scenes"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.AgentConversation", b => { b.HasOne("NovelSoftware.Domain.Entities.Project", "Project") .WithMany("Conversations") .HasForeignKey("ProjectId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Project"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.AgentMessage", b => { b.HasOne("NovelSoftware.Domain.Entities.AgentConversation", "Conversation") .WithMany("Messages") .HasForeignKey("ConversationId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Conversation"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Chapter", b => { b.HasOne("NovelSoftware.Domain.Entities.Character", "PovCharacter") .WithMany() .HasForeignKey("PovCharacterId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("NovelSoftware.Domain.Entities.Project", "Project") .WithMany("Chapters") .HasForeignKey("ProjectId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("PovCharacter"); b.Navigation("Project"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Character", b => { b.HasOne("NovelSoftware.Domain.Entities.Project", "Project") .WithMany("Characters") .HasForeignKey("ProjectId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Project"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.CharacterRelationship", b => { b.HasOne("NovelSoftware.Domain.Entities.Character", "Character") .WithMany("Relationships") .HasForeignKey("CharacterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("NovelSoftware.Domain.Entities.Character", "RelatedCharacter") .WithMany() .HasForeignKey("RelatedCharacterId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Character"); b.Navigation("RelatedCharacter"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.OutlineNode", b => { b.HasOne("NovelSoftware.Domain.Entities.Chapter", "Chapter") .WithMany() .HasForeignKey("ChapterId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("NovelSoftware.Domain.Entities.OutlineNode", "Parent") .WithMany("Children") .HasForeignKey("ParentId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("NovelSoftware.Domain.Entities.Project", "Project") .WithMany("OutlineNodes") .HasForeignKey("ProjectId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Chapter"); b.Navigation("Parent"); b.Navigation("Project"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Scene", b => { b.HasOne("NovelSoftware.Domain.Entities.Chapter", "Chapter") .WithMany("Scenes") .HasForeignKey("ChapterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("NovelSoftware.Domain.Entities.Character", "PovCharacter") .WithMany() .HasForeignKey("PovCharacterId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("Chapter"); b.Navigation("PovCharacter"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.AgentConversation", b => { b.Navigation("Messages"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Chapter", b => { b.Navigation("Scenes"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Character", b => { b.Navigation("Relationships"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.OutlineNode", b => { b.Navigation("Children"); }); modelBuilder.Entity("NovelSoftware.Domain.Entities.Project", b => { b.Navigation("Chapters"); b.Navigation("Characters"); b.Navigation("Conversations"); b.Navigation("OutlineNodes"); }); #pragma warning restore 612, 618 } } }