// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using RLHF.Generator.Persistence; #nullable disable namespace RLHF.Generator.Persistence.Migrations { [DbContext(typeof(RlhfGeneratorDbContext))] partial class RlhfGeneratorDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "10.0.8") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("RLHF.Generator.Persistence.Category", b => { b.Property("Id") .HasColumnType("int"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(128)"); b.HasKey("Id"); b.ToTable("Category", "dbo"); b.HasData( new { Id = 1, Name = "MEDICAL_ALLERGY" }, new { Id = 2, Name = "MEDICAL_DIAGNOSIS" }, new { Id = 3, Name = "MEDICAL_FAMILY_HISTORY" }, new { Id = 4, Name = "MEDICAL_MEDICATION" }, new { Id = 5, Name = "MEDICAL_MENTAL_HEALTH" }, new { Id = 6, Name = "MEDICAL_OTHER" }, new { Id = 7, Name = "MEDICAL_PHYSICAL_HEALTH" }, new { Id = 8, Name = "MEDICAL_PROCEDURE" }, new { Id = 9, Name = "MEDICAL_SUBSTANCE_USE" }, new { Id = 10, Name = "MEDICAL_SYMPTOM" }, new { Id = 11, Name = "MEDICAL_TEST" }, new { Id = 12, Name = "MEDICAL_TREATMENT" }); }); modelBuilder.Entity("RLHF.Generator.Persistence.GenerationRun", b => { b.Property("Id") .HasColumnType("uniqueidentifier"); b.Property("CompletedAt") .HasColumnType("datetimeoffset"); b.Property("ConfigurationFingerprint") .IsRequired() .HasColumnType("char(64)"); b.Property("CurrentCategoryId") .HasColumnType("int"); b.Property("CurrentIsPositive") .HasColumnType("bit"); b.Property("FailureMessage") .HasColumnType("nvarchar(1024)"); b.Property("FailureType") .HasColumnType("nvarchar(256)"); b.Property("InputFingerprint") .IsRequired() .HasColumnType("char(64)"); b.Property("LastCheckpointAt") .HasColumnType("datetimeoffset"); b.Property("LastCommittedPlanOrdinal") .HasColumnType("bigint"); b.Property("RandomSeed") .HasColumnType("int"); b.Property("StartedAt") .HasColumnType("datetimeoffset"); b.Property("Status") .IsRequired() .HasColumnType("nvarchar(16)"); b.Property("TotalCommittedRowCount") .HasColumnType("int"); b.Property("TotalExpectedRowCount") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("CurrentCategoryId"); b.HasIndex("Status"); b.ToTable("GenerationRun", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.Keyword", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CategoryId") .HasColumnType("int"); b.Property("Value") .IsRequired() .HasMaxLength(450) .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("CategoryId", "Value") .IsUnique(); b.ToTable("Keyword", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.KeywordVariant", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ParentId") .HasColumnType("int"); b.Property("Value") .IsRequired() .HasMaxLength(450) .HasColumnType("nvarchar(450)"); b.HasKey("Id"); b.HasIndex("ParentId", "Value") .IsUnique(); b.ToTable("KeywordVariant", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.TrainingItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CategoryId") .HasColumnType("int"); b.Property("GenerationRunId") .HasColumnType("uniqueidentifier"); b.Property("IsPositive") .HasColumnType("bit"); b.Property("KeywordId") .HasColumnType("int"); b.Property("PlanOrdinal") .HasColumnType("bigint"); b.Property("RecordKey") .HasColumnType("char(64)"); b.Property("Value") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.HasIndex("KeywordId"); b.HasIndex("RecordKey") .IsUnique() .HasFilter("[RecordKey] IS NOT NULL"); b.HasIndex("GenerationRunId", "PlanOrdinal") .IsUnique() .HasFilter("[GenerationRunId] IS NOT NULL AND [PlanOrdinal] IS NOT NULL"); b.ToTable("TrainingItem", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.GenerationRun", b => { b.HasOne("RLHF.Generator.Persistence.Category", null) .WithMany() .HasForeignKey("CurrentCategoryId") .OnDelete(DeleteBehavior.Restrict); }); modelBuilder.Entity("RLHF.Generator.Persistence.Keyword", b => { b.HasOne("RLHF.Generator.Persistence.Category", "Category") .WithMany("Keywords") .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.Navigation("Category"); }); modelBuilder.Entity("RLHF.Generator.Persistence.KeywordVariant", b => { b.HasOne("RLHF.Generator.Persistence.Keyword", "Parent") .WithMany("Variants") .HasForeignKey("ParentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Parent"); }); modelBuilder.Entity("RLHF.Generator.Persistence.TrainingItem", b => { b.HasOne("RLHF.Generator.Persistence.Category", null) .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); b.HasOne("RLHF.Generator.Persistence.GenerationRun", null) .WithMany() .HasForeignKey("GenerationRunId") .OnDelete(DeleteBehavior.Restrict); b.HasOne("RLHF.Generator.Persistence.Keyword", "Keyword") .WithMany("TrainingItems") .HasForeignKey("KeywordId") .OnDelete(DeleteBehavior.Restrict); b.Navigation("Keyword"); }); modelBuilder.Entity("RLHF.Generator.Persistence.Category", b => { b.Navigation("Keywords"); }); modelBuilder.Entity("RLHF.Generator.Persistence.Keyword", b => { b.Navigation("TrainingItems"); b.Navigation("Variants"); }); #pragma warning restore 612, 618 } } }