// using System; using HospitalDataBaseImplements; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace HospitalDataBaseImplements.Migrations { [DbContext(typeof(HospitalDatabase))] partial class HospitalDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("HospitalDataBaseImplements.Models.Client", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientFIO") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Clients"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Illness", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Form") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("IllnessName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Illnesses"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessKurse", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("IllnessId") .HasColumnType("int"); b.Property("KurseId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("IllnessId"); b.HasIndex("KurseId"); b.ToTable("IllnessKurse"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessSymptoms", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("IllnessId") .HasColumnType("int"); b.Property("SymptomsId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("IllnessId"); b.HasIndex("SymptomsId"); b.ToTable("IllnessSymptomses"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.KurseMedicines", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("KurseId") .HasColumnType("int"); b.Property("MedicineId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("KurseId"); b.HasIndex("MedicineId"); b.ToTable("KurseMedicines"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Kurses", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("CountInDay") .HasColumnType("int"); b.Property("Duration") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Kurse"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientId") .HasColumnType("int"); b.Property("Group") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("MedicinesName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ClientId"); b.ToTable("Medicines"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.ProcedureMedicine", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("MedicineId") .HasColumnType("int"); b.Property("ProcedureId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("MedicineId"); b.HasIndex("ProcedureId"); b.ToTable("ProcedureMedicine"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientId") .HasColumnType("int"); b.Property("ProceduresName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Type") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.HasIndex("ClientId"); b.ToTable("Procedures"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ClientId") .HasColumnType("int"); b.Property("Date") .HasColumnType("datetime2"); b.Property("Dose") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ModeOfApplication") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SymptomsId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ClientId"); b.HasIndex("SymptomsId"); b.ToTable("Recipes"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.RecipesProcedures", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("ProcedureId") .HasColumnType("int"); b.Property("RecipesId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("ProcedureId"); b.HasIndex("RecipesId"); b.ToTable("RecipesProcedures"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Symptoms", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Description") .HasColumnType("nvarchar(max)"); b.Property("SymptomName") .IsRequired() .HasColumnType("nvarchar(max)"); b.HasKey("Id"); b.ToTable("Symptomses"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessKurse", b => { b.HasOne("HospitalDataBaseImplements.Models.Illness", "Illness") .WithMany("Kurses") .HasForeignKey("IllnessId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Kurses", "Kurse") .WithMany("IllnessKurses") .HasForeignKey("KurseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Illness"); b.Navigation("Kurse"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessSymptoms", b => { b.HasOne("HospitalDataBaseImplements.Models.Illness", "Illness") .WithMany("Symptomses") .HasForeignKey("IllnessId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Symptoms", "Symptoms") .WithMany("IllnessSymptomses") .HasForeignKey("SymptomsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Illness"); b.Navigation("Symptoms"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.KurseMedicines", b => { b.HasOne("HospitalDataBaseImplements.Models.Kurses", "Kurse") .WithMany("Medicines") .HasForeignKey("KurseId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Medicines", "Medicine") .WithMany("KurseMedicines") .HasForeignKey("MedicineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Kurse"); b.Navigation("Medicine"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b => { b.HasOne("HospitalDataBaseImplements.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.ProcedureMedicine", b => { b.HasOne("HospitalDataBaseImplements.Models.Medicines", "Medicine") .WithMany("Procedures") .HasForeignKey("MedicineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Procedures", "Procedure") .WithMany("Medicines") .HasForeignKey("ProcedureId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Medicine"); b.Navigation("Procedure"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b => { b.HasOne("HospitalDataBaseImplements.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b => { b.HasOne("HospitalDataBaseImplements.Models.Client", "Client") .WithMany() .HasForeignKey("ClientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Symptoms", "Symptoms") .WithMany() .HasForeignKey("SymptomsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Client"); b.Navigation("Symptoms"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.RecipesProcedures", b => { b.HasOne("HospitalDataBaseImplements.Models.Procedures", "Procedure") .WithMany() .HasForeignKey("ProcedureId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDataBaseImplements.Models.Recipes", "Recipe") .WithMany("Procedures") .HasForeignKey("RecipesId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Procedure"); b.Navigation("Recipe"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Illness", b => { b.Navigation("Kurses"); b.Navigation("Symptomses"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Kurses", b => { b.Navigation("IllnessKurses"); b.Navigation("Medicines"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b => { b.Navigation("KurseMedicines"); b.Navigation("Procedures"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b => { b.Navigation("Medicines"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b => { b.Navigation("Procedures"); }); modelBuilder.Entity("HospitalDataBaseImplements.Models.Symptoms", b => { b.Navigation("IllnessSymptomses"); }); #pragma warning restore 612, 618 } } }