// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using SimpleLIS; #nullable disable namespace SimpleLIS.Migrations { [DbContext(typeof(HL7DbContext))] [Migration("20241213124817_Patients got messages")] partial class Patientsgotmessages { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.11"); modelBuilder.Entity("SimpleLIS.Models.Message", b => { b.Property("MessageId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ControlId") .IsRequired() .HasColumnType("TEXT"); b.Property("MessageType") .IsRequired() .HasColumnType("TEXT"); b.Property("PatientId") .HasColumnType("INTEGER"); b.Property("ReceivingApp") .IsRequired() .HasColumnType("TEXT"); b.Property("ReceivingFacility") .IsRequired() .HasColumnType("TEXT"); b.Property("SendingApp") .IsRequired() .HasColumnType("TEXT"); b.Property("SendingFacility") .IsRequired() .HasColumnType("TEXT"); b.Property("Timestamp") .HasColumnType("TEXT"); b.Property("Version") .IsRequired() .HasColumnType("TEXT"); b.HasKey("MessageId"); b.HasIndex("PatientId"); b.ToTable("Messages"); }); modelBuilder.Entity("SimpleLIS.Models.Observation", b => { b.Property("ObservationId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AbnormalFlag") .IsRequired() .HasColumnType("TEXT"); b.Property("MessageId") .HasColumnType("INTEGER"); b.Property("ObservationCode") .IsRequired() .HasColumnType("TEXT"); b.Property("ObservationValue") .IsRequired() .HasColumnType("TEXT"); b.Property("ResultStatus") .IsRequired() .HasColumnType("TEXT"); b.Property("Units") .IsRequired() .HasColumnType("TEXT"); b.HasKey("ObservationId"); b.HasIndex("MessageId"); b.ToTable("Observations"); }); modelBuilder.Entity("SimpleLIS.Models.Patient", b => { b.Property("PatientId") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("DateOfBirth") .HasColumnType("TEXT"); b.Property("FirstName") .IsRequired() .HasColumnType("TEXT"); b.Property("Gender") .IsRequired() .HasColumnType("TEXT"); b.Property("HL7PatientId") .IsRequired() .HasColumnType("TEXT"); b.Property("LastName") .IsRequired() .HasColumnType("TEXT"); b.HasKey("PatientId"); b.ToTable("Patients"); }); modelBuilder.Entity("SimpleLIS.Models.Message", b => { b.HasOne("SimpleLIS.Models.Patient", "Patient") .WithMany("Messages") .HasForeignKey("PatientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Patient"); }); modelBuilder.Entity("SimpleLIS.Models.Observation", b => { b.HasOne("SimpleLIS.Models.Message", "Message") .WithMany("Observations") .HasForeignKey("MessageId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Message"); }); modelBuilder.Entity("SimpleLIS.Models.Message", b => { b.Navigation("Observations"); }); modelBuilder.Entity("SimpleLIS.Models.Patient", b => { b.Navigation("Messages"); }); #pragma warning restore 612, 618 } } }