// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using RLHF.Generator.Persistence; #nullable disable namespace RLHF.Generator.Persistence.Migrations { [DbContext(typeof(RlhfGeneratorDbContext))] [Migration("20260724081401_InitialCreate")] partial class InitialCreate { /// protected override void BuildTargetModel(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.TrainingItem", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CategoryId") .HasColumnType("int"); b.Property("IsPositive") .HasColumnType("bit"); b.Property("Value") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("CategoryId"); b.ToTable("TrainingItem", "dbo"); }); modelBuilder.Entity("RLHF.Generator.Persistence.TrainingItem", b => { b.HasOne("RLHF.Generator.Persistence.Category", null) .WithMany() .HasForeignKey("CategoryId") .OnDelete(DeleteBehavior.Restrict) .IsRequired(); }); #pragma warning restore 612, 618 } } }