вливаю всё, что было создано на 5, 6, 7 этапах в ветку main #12
456
Polyclinic/PolyclinicDatabaseImplement/Migrations/20240501145526_Init-Create.Designer.cs
generated
Normal file
456
Polyclinic/PolyclinicDatabaseImplement/Migrations/20240501145526_Init-Create.Designer.cs
generated
Normal file
@ -0,0 +1,456 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SecuritySystemDatabaseImplement;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PolyclinicDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(PolyclinicDatabase))]
|
||||
[Migration("20240501145526_Init-Create")]
|
||||
partial class InitCreate
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.16")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Course", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DaysCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PillsPerDay")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Courses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.CourseDiagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CourseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DiagnoseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CourseId");
|
||||
|
||||
b.HasIndex("DiagnoseId");
|
||||
|
||||
b.ToTable("CourseDiagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Diagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateStartDiagnose")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateStopDiagnose")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Diagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Medicament", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ProcedureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("SymptomId")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProcedureId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("Medicaments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Procedure", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateStartProcedure")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateStopProcedure")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Procedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("CourseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProceduresCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CourseId");
|
||||
|
||||
b.ToTable("Recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.RecipeProcedure", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ProcedureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RecipeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProcedureId");
|
||||
|
||||
b.HasIndex("RecipeId");
|
||||
|
||||
b.ToTable("RecipeProcedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Symptom", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Symptomes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomDiagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DiagnoseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SymptomId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DiagnoseId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("SymptomDiagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("RecipeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SymptomId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RecipeId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("SymptomRecipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Role")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.CourseDiagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Course", "Course")
|
||||
.WithMany("Diagnoses")
|
||||
.HasForeignKey("CourseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Diagnose", "Diagnose")
|
||||
.WithMany()
|
||||
.HasForeignKey("DiagnoseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Course");
|
||||
|
||||
b.Navigation("Diagnose");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Diagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Medicament", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Procedure", "Procedure")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProcedureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany()
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Procedure");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Procedure", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Course", "Course")
|
||||
.WithMany()
|
||||
.HasForeignKey("CourseId");
|
||||
|
||||
b.Navigation("Course");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.RecipeProcedure", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Procedure", "Procedure")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProcedureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Recipe", "Recipe")
|
||||
.WithMany("Procedures")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Procedure");
|
||||
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomDiagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Diagnose", "Diagnose")
|
||||
.WithMany()
|
||||
.HasForeignKey("DiagnoseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany("Diagnoses")
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Diagnose");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomRecipe", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Recipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany()
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Recipe");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Course", b =>
|
||||
{
|
||||
b.Navigation("Diagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.Navigation("Procedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Symptom", b =>
|
||||
{
|
||||
b.Navigation("Diagnoses");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,360 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PolyclinicDatabaseImplement.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class InitCreate : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Courses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DaysCount = table.Column<int>(type: "int", nullable: false),
|
||||
PillsPerDay = table.Column<int>(type: "int", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Courses", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Symptomes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Symptomes", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Users",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
FIO = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Email = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Password = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Role = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Users", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Recipes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ProceduresCount = table.Column<int>(type: "int", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
CourseId = table.Column<int>(type: "int", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Recipes", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Recipes_Courses_CourseId",
|
||||
column: x => x.CourseId,
|
||||
principalTable: "Courses",
|
||||
principalColumn: "Id");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Diagnoses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
UserId = table.Column<int>(type: "int", nullable: false),
|
||||
DateStartDiagnose = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DateStopDiagnose = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Diagnoses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Diagnoses_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Procedures",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
UserId = table.Column<int>(type: "int", nullable: false),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
DateStartProcedure = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DateStopProcedure = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Procedures", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Procedures_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SymptomRecipes",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
SymptomId = table.Column<int>(type: "int", nullable: false),
|
||||
RecipeId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SymptomRecipes", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SymptomRecipes_Recipes_RecipeId",
|
||||
column: x => x.RecipeId,
|
||||
principalTable: "Recipes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SymptomRecipes_Symptomes_SymptomId",
|
||||
column: x => x.SymptomId,
|
||||
principalTable: "Symptomes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "CourseDiagnoses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CourseId = table.Column<int>(type: "int", nullable: false),
|
||||
DiagnoseId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_CourseDiagnoses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_CourseDiagnoses_Courses_CourseId",
|
||||
column: x => x.CourseId,
|
||||
principalTable: "Courses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_CourseDiagnoses_Diagnoses_DiagnoseId",
|
||||
column: x => x.DiagnoseId,
|
||||
principalTable: "Diagnoses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SymptomDiagnoses",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
SymptomId = table.Column<int>(type: "int", nullable: false),
|
||||
DiagnoseId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SymptomDiagnoses", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_SymptomDiagnoses_Diagnoses_DiagnoseId",
|
||||
column: x => x.DiagnoseId,
|
||||
principalTable: "Diagnoses",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_SymptomDiagnoses_Symptomes_SymptomId",
|
||||
column: x => x.SymptomId,
|
||||
principalTable: "Symptomes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Medicaments",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Comment = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ProcedureId = table.Column<int>(type: "int", nullable: false),
|
||||
SymptomId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Medicaments", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Medicaments_Procedures_ProcedureId",
|
||||
column: x => x.ProcedureId,
|
||||
principalTable: "Procedures",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Medicaments_Symptomes_SymptomId",
|
||||
column: x => x.SymptomId,
|
||||
principalTable: "Symptomes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "RecipeProcedures",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
ProcedureId = table.Column<int>(type: "int", nullable: false),
|
||||
RecipeId = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_RecipeProcedures", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_RecipeProcedures_Procedures_ProcedureId",
|
||||
column: x => x.ProcedureId,
|
||||
principalTable: "Procedures",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_RecipeProcedures_Recipes_RecipeId",
|
||||
column: x => x.RecipeId,
|
||||
principalTable: "Recipes",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CourseDiagnoses_CourseId",
|
||||
table: "CourseDiagnoses",
|
||||
column: "CourseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_CourseDiagnoses_DiagnoseId",
|
||||
table: "CourseDiagnoses",
|
||||
column: "DiagnoseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Diagnoses_UserId",
|
||||
table: "Diagnoses",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Medicaments_ProcedureId",
|
||||
table: "Medicaments",
|
||||
column: "ProcedureId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Medicaments_SymptomId",
|
||||
table: "Medicaments",
|
||||
column: "SymptomId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Procedures_UserId",
|
||||
table: "Procedures",
|
||||
column: "UserId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RecipeProcedures_ProcedureId",
|
||||
table: "RecipeProcedures",
|
||||
column: "ProcedureId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_RecipeProcedures_RecipeId",
|
||||
table: "RecipeProcedures",
|
||||
column: "RecipeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Recipes_CourseId",
|
||||
table: "Recipes",
|
||||
column: "CourseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SymptomDiagnoses_DiagnoseId",
|
||||
table: "SymptomDiagnoses",
|
||||
column: "DiagnoseId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SymptomDiagnoses_SymptomId",
|
||||
table: "SymptomDiagnoses",
|
||||
column: "SymptomId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SymptomRecipes_RecipeId",
|
||||
table: "SymptomRecipes",
|
||||
column: "RecipeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_SymptomRecipes_SymptomId",
|
||||
table: "SymptomRecipes",
|
||||
column: "SymptomId");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "CourseDiagnoses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Medicaments");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "RecipeProcedures");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SymptomDiagnoses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "SymptomRecipes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Procedures");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Diagnoses");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Recipes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Symptomes");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Users");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Courses");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,453 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using SecuritySystemDatabaseImplement;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PolyclinicDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(PolyclinicDatabase))]
|
||||
partial class PolyclinicDatabaseModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "7.0.16")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Course", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DaysCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("PillsPerDay")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Courses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.CourseDiagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("CourseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DiagnoseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CourseId");
|
||||
|
||||
b.HasIndex("DiagnoseId");
|
||||
|
||||
b.ToTable("CourseDiagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Diagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateStartDiagnose")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateStopDiagnose")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Diagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Medicament", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ProcedureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int?>("SymptomId")
|
||||
.IsRequired()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProcedureId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("Medicaments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Procedure", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateStartProcedure")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("DateStopProcedure")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("UserId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Procedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int?>("CourseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ProceduresCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CourseId");
|
||||
|
||||
b.ToTable("Recipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.RecipeProcedure", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("ProcedureId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RecipeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProcedureId");
|
||||
|
||||
b.HasIndex("RecipeId");
|
||||
|
||||
b.ToTable("RecipeProcedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Symptom", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Symptomes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomDiagnose", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("DiagnoseId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SymptomId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("DiagnoseId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("SymptomDiagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomRecipe", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<int>("RecipeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("SymptomId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("RecipeId");
|
||||
|
||||
b.HasIndex("SymptomId");
|
||||
|
||||
b.ToTable("SymptomRecipes");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.User", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FIO")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Role")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.CourseDiagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Course", "Course")
|
||||
.WithMany("Diagnoses")
|
||||
.HasForeignKey("CourseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Diagnose", "Diagnose")
|
||||
.WithMany()
|
||||
.HasForeignKey("DiagnoseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Course");
|
||||
|
||||
b.Navigation("Diagnose");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Diagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Medicament", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Procedure", "Procedure")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProcedureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany()
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Procedure");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Procedure", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.User", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Course", "Course")
|
||||
.WithMany()
|
||||
.HasForeignKey("CourseId");
|
||||
|
||||
b.Navigation("Course");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.RecipeProcedure", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Procedure", "Procedure")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProcedureId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Recipe", "Recipe")
|
||||
.WithMany("Procedures")
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Procedure");
|
||||
|
||||
b.Navigation("Recipe");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomDiagnose", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Diagnose", "Diagnose")
|
||||
.WithMany()
|
||||
.HasForeignKey("DiagnoseId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany("Diagnoses")
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Diagnose");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.SymptomRecipe", b =>
|
||||
{
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Recipe", "Recipe")
|
||||
.WithMany()
|
||||
.HasForeignKey("RecipeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("PolyclinicDatabaseImplement.Models.Symptom", "Symptom")
|
||||
.WithMany()
|
||||
.HasForeignKey("SymptomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Recipe");
|
||||
|
||||
b.Navigation("Symptom");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Course", b =>
|
||||
{
|
||||
b.Navigation("Diagnoses");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Recipe", b =>
|
||||
{
|
||||
b.Navigation("Procedures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("PolyclinicDatabaseImplement.Models.Symptom", b =>
|
||||
{
|
||||
b.Navigation("Diagnoses");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
@ -6,7 +6,6 @@
|
||||
public static (string Url, string Title) Medicaments = ("Medicaments", "Лекарства");
|
||||
public static (string Url, string Title) Procedures = ("Procedures", "Процедуры");
|
||||
public static (string Url, string Title) Recipes = ("Recipes", "Рецепты");
|
||||
public static (string Url, string Title) Users = ("Users", "Пользователи");
|
||||
public static (string Url, string Title) Login = ("Login", "Вход");
|
||||
public static (string Url, string Title) Register = ("Register", "Регистрация");
|
||||
public static (string Url, string Title) AddSymptomToMedicament = ("AddSymptomToMedicament", "Привязка симптома к лекарству");
|
||||
@ -15,7 +14,7 @@
|
||||
|
||||
public static List<(string Url, string Title)> MenuItemsOrder = new List<(string Url, string Title)>
|
||||
{
|
||||
Index, Medicaments, Procedures, Recipes, Users, ListCoursesByProcedures, Login, Register, AddSymptomToMedicament, ProceduresReport
|
||||
Index, Medicaments, Procedures, Recipes, ListCoursesByProcedures, Login, Register, AddSymptomToMedicament, ProceduresReport
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,20 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="d-flex flex-column mb-5 mt-5">
|
||||
<div class="col-8"></div>
|
||||
|
||||
<div class="d-flex flex-column mb-5 mt-5 justify-content-between align-content-around">
|
||||
<div class="mb-5 me-3">
|
||||
<label for="dateFrom" class="me-3">
|
||||
Дата начала
|
||||
</label>
|
||||
<input type="date" id="dateFrom" name="dateFrom" />
|
||||
</div>
|
||||
<div class="mb-5 me-3">
|
||||
<label for="dateTo" class="me-3">
|
||||
Дата завершения
|
||||
</label>
|
||||
<input type="date" id="dateTo" name="dateTo" />
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="submit" value="Сохранить" class="button-save-procedure btn" asp-action="Procedures" />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user