Rogashova_E.A._CourseWork_H.../HospitalDataBaseImplements/Migrations/20230620143135_InitialCreate.Designer.cs

490 lines
17 KiB
C#
Raw Normal View History

2023-04-07 00:53:55 +04:00
// <auto-generated />
using System;
using HospitalDataBaseImplements;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace HospitalDataBaseImplements.Migrations
{
[DbContext(typeof(HospitalDatabase))]
[Migration("20230620143135_InitialCreate")]
2023-04-07 00:53:55 +04:00
partial class InitialCreate
{
/// <inheritdoc />
protected override void BuildTargetModel(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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClientFIO")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Illness", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Form")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("IllnessName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Illnesses");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessKurse", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("IllnessId")
.HasColumnType("int");
b.Property<int>("KurseId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("IllnessId");
b.HasIndex("KurseId");
b.ToTable("IllnessKurse");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.IllnessSymptoms", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("IllnessId")
.HasColumnType("int");
b.Property<int>("SymptomsId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("IllnessId");
b.HasIndex("SymptomsId");
b.ToTable("IllnessSymptomses");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.KurseMedicines", b =>
2023-04-07 00:53:55 +04:00
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("KurseId")
2023-04-07 00:53:55 +04:00
.HasColumnType("int");
b.Property<int>("MedicineId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("KurseId");
2023-04-07 00:53:55 +04:00
b.HasIndex("MedicineId");
b.ToTable("KurseMedicines");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Kurses", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
2023-04-07 00:53:55 +04:00
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("CountInDay")
.HasColumnType("int");
b.Property<string>("Duration")
2023-04-07 00:53:55 +04:00
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("Kurse");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
2023-05-20 06:49:33 +04:00
b.Property<int>("ClientId")
.HasColumnType("int");
2023-04-07 00:53:55 +04:00
b.Property<string>("Group")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("MedicinesName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
2023-05-20 06:49:33 +04:00
b.HasIndex("ClientId");
2023-04-07 00:53:55 +04:00
b.ToTable("Medicines");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.ProcedureMedicine", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("MedicineId")
.HasColumnType("int");
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("MedicineId");
b.HasIndex("ProcedureId");
b.ToTable("ProcedureMedicine");
});
2023-04-07 00:53:55 +04:00
modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
2023-05-20 06:49:33 +04:00
b.Property<int>("ClientId")
.HasColumnType("int");
2023-04-07 00:53:55 +04:00
b.Property<string>("ProceduresName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
2023-05-20 06:49:33 +04:00
b.HasIndex("ClientId");
2023-04-07 00:53:55 +04:00
b.ToTable("Procedures");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("int");
b.Property<DateTime>("Date")
.HasColumnType("datetime2");
b.Property<string>("Dose")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("ModeOfApplication")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("SymptomsId")
.HasColumnType("int");
2023-04-07 00:53:55 +04:00
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasIndex("SymptomsId");
2023-04-07 00:53:55 +04:00
b.ToTable("Recipes");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.RecipesProcedures", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<int>("ProcedureId")
.HasColumnType("int");
b.Property<int>("RecipesId")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("ProcedureId");
b.HasIndex("RecipesId");
b.ToTable("RecipesProcedures");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Symptoms", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("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 =>
2023-04-07 00:53:55 +04:00
{
b.HasOne("HospitalDataBaseImplements.Models.Kurses", "Kurse")
.WithMany("Medicines")
.HasForeignKey("KurseId")
2023-04-07 00:53:55 +04:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HospitalDataBaseImplements.Models.Medicines", "Medicine")
.WithMany("KurseMedicines")
.HasForeignKey("MedicineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Kurse");
b.Navigation("Medicine");
2023-04-07 00:53:55 +04:00
});
2023-05-20 06:49:33 +04:00
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");
});
2023-05-20 06:49:33 +04:00
modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b =>
{
b.HasOne("HospitalDataBaseImplements.Models.Client", "Client")
.WithMany()
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
2023-04-07 00:53:55 +04:00
modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b =>
{
b.HasOne("HospitalDataBaseImplements.Models.Client", "Client")
2023-05-20 06:49:33 +04:00
.WithMany()
2023-04-07 00:53:55 +04:00
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("HospitalDataBaseImplements.Models.Symptoms", "Symptoms")
2023-04-07 00:53:55 +04:00
.WithMany()
.HasForeignKey("SymptomsId")
2023-04-07 00:53:55 +04:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
b.Navigation("Symptoms");
2023-04-07 00:53:55 +04:00
});
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");
2023-04-07 00:53:55 +04:00
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b =>
{
b.Navigation("KurseMedicines");
b.Navigation("Procedures");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b =>
{
b.Navigation("Medicines");
});
2023-04-07 00:53:55 +04:00
modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b =>
{
b.Navigation("Procedures");
});
modelBuilder.Entity("HospitalDataBaseImplements.Models.Symptoms", b =>
{
b.Navigation("IllnessSymptomses");
});
#pragma warning restore 612, 618
}
}
}