// <auto-generated />
using System;
using LISWebAPI.Persistence;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace LISWebAPI.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    partial class ApplicationDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("Relational:MaxIdentifierLength", 128)
                .HasAnnotation("ProductVersion", "5.0.6")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("Model.Models.VitrosModels.Component", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<string>("DisplayName")
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<int>("MachineId")
                        .HasColumnType("int");

                    b.Property<string>("TestName")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("Id");

                    b.HasIndex("MachineId");

                    b.ToTable("LAB_LIS_ComponentMaster");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Machine", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<string>("MachineDescription")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("MachinedCode")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("MachinedName")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Manufacture")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("ParserName")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Remarks")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("Id");

                    b.ToTable("LIS_CFG_LabMachine");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Result", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<string>("BarCodeNumber")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("ComponentMasterId")
                        .HasColumnType("int");

                    b.Property<string>("Error")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("ErrorFlag")
                        .HasColumnType("nvarchar(max)");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<bool>("IsSync")
                        .HasColumnType("bit");

                    b.Property<int?>("LisSampleId")
                        .HasColumnType("int");

                    b.Property<int>("MachineId")
                        .HasColumnType("int");

                    b.Property<string>("Test")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Unit")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Value")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Warning")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("WarningFlag")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("Id");

                    b.HasIndex("LisSampleId");

                    b.HasIndex("MachineId");

                    b.ToTable("LAB_LIS_SampleResult");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Sample", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd()
                        .HasColumnType("int")
                        .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

                    b.Property<string>("BarCodeNumber")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("ControlFlag")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("Cup")
                        .HasColumnType("nvarchar(max)");

                    b.Property<DateTime>("DateTime")
                        .HasColumnType("datetime2");

                    b.Property<string>("DilutionFactor")
                        .HasColumnType("nvarchar(max)");

                    b.Property<int>("Fluid")
                        .HasColumnType("int");

                    b.Property<bool>("IsActive")
                        .HasColumnType("bit");

                    b.Property<int>("MachineId")
                        .HasColumnType("int");

                    b.Property<int>("Mode")
                        .HasColumnType("int");

                    b.Property<string>("Quadrant")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("StatFlag")
                        .HasColumnType("nvarchar(max)");

                    b.Property<string>("TrayName")
                        .HasColumnType("nvarchar(max)");

                    b.HasKey("Id");

                    b.HasIndex("MachineId");

                    b.ToTable("LAB_LIS_SampleData");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Component", b =>
                {
                    b.HasOne("Model.Models.VitrosModels.Machine", "Machine")
                        .WithMany("Components")
                        .HasForeignKey("MachineId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Machine");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Result", b =>
                {
                    b.HasOne("Model.Models.VitrosModels.Sample", "Sample")
                        .WithMany("Results")
                        .HasForeignKey("LisSampleId");

                    b.HasOne("Model.Models.VitrosModels.Machine", "Machine")
                        .WithMany()
                        .HasForeignKey("MachineId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Machine");

                    b.Navigation("Sample");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Sample", b =>
                {
                    b.HasOne("Model.Models.VitrosModels.Machine", "Machine")
                        .WithMany("Samples")
                        .HasForeignKey("MachineId")
                        .OnDelete(DeleteBehavior.Cascade)
                        .IsRequired();

                    b.Navigation("Machine");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Machine", b =>
                {
                    b.Navigation("Components");

                    b.Navigation("Samples");
                });

            modelBuilder.Entity("Model.Models.VitrosModels.Sample", b =>
                {
                    b.Navigation("Results");
                });
#pragma warning restore 612, 618
        }
    }
}
