// using System; using HospitalDatabaseImplement; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace HospitalDatabaseImplement.Migrations { [DbContext(typeof(HospitalDatabase))] partial class HospitalDatabaseModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.13") .HasAnnotation("Relational:MaxIdentifierLength", 128); SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("HospitalDatabaseImplement.Models.Disease", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.Property("RecipeId") .HasColumnType("int"); b.Property("Symptoms") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.HasKey("Id"); b.HasIndex("RecipeId"); b.ToTable("Diseases"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Doctor", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Email") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.Property("FullName") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Password") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.Property("Post") .HasColumnType("int"); b.HasKey("Id"); b.ToTable("Doctors"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Medicine", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Description") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Name") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.HasKey("Id"); b.ToTable("Medicines"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Patient", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("BirthDate") .HasColumnType("datetime2"); b.Property("DoctorId") .HasColumnType("int"); b.Property("FullName") .IsRequired() .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Phone") .IsRequired() .HasMaxLength(16) .HasColumnType("nvarchar(16)"); b.HasKey("Id"); b.HasIndex("DoctorId"); b.ToTable("Patients"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.PatientProcedure", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("PatientId") .HasColumnType("int"); b.Property("ProcedureId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("PatientId"); b.HasIndex("ProcedureId"); b.ToTable("PatientProcedures"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.PatientRecipe", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("PatientId") .HasColumnType("int"); b.Property("RecipeId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("PatientId"); b.HasIndex("RecipeId"); b.ToTable("PatientRecipes"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Procedure", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Description") .HasMaxLength(100) .HasColumnType("nvarchar(100)"); b.Property("Name") .IsRequired() .HasMaxLength(30) .HasColumnType("nvarchar(30)"); b.HasKey("Id"); b.ToTable("Procedures"); }); modelBuilder.Entity("HospitalDatabaseImplement.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("ProcedureMedicines"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Recipe", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("DoctorId") .HasColumnType("int"); b.Property("IssueDate") .HasColumnType("datetime2"); b.HasKey("Id"); b.HasIndex("DoctorId"); b.ToTable("Recipes"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.RecipeMedicine", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("MedicineId") .HasColumnType("int"); b.Property("RecipeId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("MedicineId"); b.HasIndex("RecipeId"); b.ToTable("RecipeMedicines"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Disease", b => { b.HasOne("HospitalDatabaseImplement.Models.Recipe", "Recipe") .WithMany() .HasForeignKey("RecipeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Recipe"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Patient", b => { b.HasOne("HospitalDatabaseImplement.Models.Doctor", "Doctor") .WithMany() .HasForeignKey("DoctorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Doctor"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.PatientProcedure", b => { b.HasOne("HospitalDatabaseImplement.Models.Patient", "Patient") .WithMany("Procedures") .HasForeignKey("PatientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDatabaseImplement.Models.Procedure", "Procedure") .WithMany() .HasForeignKey("ProcedureId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Patient"); b.Navigation("Procedure"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.PatientRecipe", b => { b.HasOne("HospitalDatabaseImplement.Models.Patient", "Patient") .WithMany("Recipes") .HasForeignKey("PatientId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDatabaseImplement.Models.Recipe", "Recipe") .WithMany() .HasForeignKey("RecipeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Patient"); b.Navigation("Recipe"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.ProcedureMedicine", b => { b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine") .WithMany() .HasForeignKey("MedicineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDatabaseImplement.Models.Procedure", "Procedure") .WithMany("Medicines") .HasForeignKey("ProcedureId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Medicine"); b.Navigation("Procedure"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Recipe", b => { b.HasOne("HospitalDatabaseImplement.Models.Doctor", "Doctor") .WithMany() .HasForeignKey("DoctorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Doctor"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.RecipeMedicine", b => { b.HasOne("HospitalDatabaseImplement.Models.Medicine", "Medicine") .WithMany() .HasForeignKey("MedicineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("HospitalDatabaseImplement.Models.Recipe", "Recipe") .WithMany("Medicines") .HasForeignKey("RecipeId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Medicine"); b.Navigation("Recipe"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Patient", b => { b.Navigation("Procedures"); b.Navigation("Recipes"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Procedure", b => { b.Navigation("Medicines"); }); modelBuilder.Entity("HospitalDatabaseImplement.Models.Recipe", b => { b.Navigation("Medicines"); }); #pragma warning restore 612, 618 } } }