simple-lis/Migrations/HL7DbContextModelSnapshot.cs
2024-12-12 17:09:08 +05:30

147 lines
4.7 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using SimpleLIS;
#nullable disable
namespace SimpleLIS.Migrations
{
[DbContext(typeof(HL7DbContext))]
partial class HL7DbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "8.0.11");
modelBuilder.Entity("SimpleLIS.Models.Message", b =>
{
b.Property<int>("MessageId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("ControlId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("MessageType")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ReceivingApp")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ReceivingFacility")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SendingApp")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("SendingFacility")
.IsRequired()
.HasColumnType("TEXT");
b.Property<DateTime>("Timestamp")
.HasColumnType("TEXT");
b.Property<string>("Version")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("MessageId");
b.ToTable("Messages");
});
modelBuilder.Entity("SimpleLIS.Models.Observation", b =>
{
b.Property<int>("ObservationId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("AbnormalFlag")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("MessageId")
.HasColumnType("INTEGER");
b.Property<string>("ObservationCode")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ObservationValue")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("ResultStatus")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Units")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("ObservationId");
b.HasIndex("MessageId");
b.ToTable("Observations");
});
modelBuilder.Entity("SimpleLIS.Models.Patient", b =>
{
b.Property<int>("PatientId")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("DateOfBirth")
.HasColumnType("TEXT");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("Gender")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("HL7PatientId")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("PatientId");
b.ToTable("Patients");
});
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");
});
#pragma warning restore 612, 618
}
}
}