454 lines
16 KiB
C#
454 lines
16 KiB
C#
// <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("20230520015950_InitialCreate")]
|
|
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.Kurses", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("CountInDay")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Duration")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("MedicinesId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("MedicinesName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MedicinesId");
|
|
|
|
b.ToTable("Kurse");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Medicines", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("ClientId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Group")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("MedicinesName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
b.ToTable("Medicines");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Procedures", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("ClientId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ProceduresName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Type")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
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<int>("MedicinesId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("ModeOfApplication")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ClientId");
|
|
|
|
b.HasIndex("MedicinesId");
|
|
|
|
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.RecipesSymptoms", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("RecipesId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("SymptomsId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RecipesId");
|
|
|
|
b.HasIndex("SymptomsId");
|
|
|
|
b.ToTable("RecipesSymptoms");
|
|
});
|
|
|
|
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.Kurses", b =>
|
|
{
|
|
b.HasOne("HospitalDataBaseImplements.Models.Medicines", "Medicines")
|
|
.WithMany()
|
|
.HasForeignKey("MedicinesId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Medicines");
|
|
});
|
|
|
|
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.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.Medicines", "Medicines")
|
|
.WithMany()
|
|
.HasForeignKey("MedicinesId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Client");
|
|
|
|
b.Navigation("Medicines");
|
|
});
|
|
|
|
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.RecipesSymptoms", b =>
|
|
{
|
|
b.HasOne("HospitalDataBaseImplements.Models.Recipes", "Recipe")
|
|
.WithMany()
|
|
.HasForeignKey("RecipesId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("HospitalDataBaseImplements.Models.Symptoms", "Symptoms")
|
|
.WithMany()
|
|
.HasForeignKey("SymptomsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Recipe");
|
|
|
|
b.Navigation("Symptoms");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Illness", b =>
|
|
{
|
|
b.Navigation("Kurses");
|
|
|
|
b.Navigation("Symptomses");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Kurses", b =>
|
|
{
|
|
b.Navigation("IllnessKurses");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Recipes", b =>
|
|
{
|
|
b.Navigation("Procedures");
|
|
});
|
|
|
|
modelBuilder.Entity("HospitalDataBaseImplements.Models.Symptoms", b =>
|
|
{
|
|
b.Navigation("IllnessSymptomses");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|