diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.Designer.cs
new file mode 100644
index 0000000..61ae776
--- /dev/null
+++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.Designer.cs
@@ -0,0 +1,835 @@
+//
+using System;
+using DatabaseCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace DatabaseCore.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20210404065039_AddDiciplineDescription")]
+ partial class AddDiciplineDescription
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.4")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Capacity")
+ .HasColumnType("int");
+
+ b.Property("ClassroomType")
+ .HasColumnType("int");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("EmployeeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("HaveProjector")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Number")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("SecurityCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Square")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Title")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeeId");
+
+ b.HasIndex("Number")
+ .IsUnique()
+ .HasFilter("[Number] IS NOT NULL");
+
+ b.ToTable("Classrooms");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineBlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisciplineBlueAsteriskName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("DisciplineShortName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineBlockId");
+
+ b.HasIndex("DisciplineName")
+ .IsUnique();
+
+ b.ToTable("Disciplines");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("DisciplineBlockBlueAsteriskName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineBlockOrder")
+ .HasColumnType("int");
+
+ b.Property("DisciplineBlockUseForGrouping")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Title")
+ .IsUnique();
+
+ b.ToTable("DisciplineBlocks");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DateBirth")
+ .HasColumnType("datetime2");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FirstName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("GroupElectricalSafety")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HomeNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("MobileNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Patronymic")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.HasIndex("FirstName", "LastName", "Patronymic")
+ .IsUnique()
+ .HasFilter("[FirstName] IS NOT NULL AND [LastName] IS NOT NULL AND [Patronymic] IS NOT NULL");
+
+ b.ToTable("Employees");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeeEmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EmployeePostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsExternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("IsInternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("Rate")
+ .HasColumnType("decimal(18,2)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeeId");
+
+ b.HasIndex("EmployeePostId");
+
+ b.ToTable("EmployeeEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeePostName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeePostName")
+ .IsUnique()
+ .HasFilter("[EmployeePostName] IS NOT NULL");
+
+ b.ToTable("EmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DateBirth")
+ .HasColumnType("datetime2");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("GroupElectricalSafety")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HomeNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("LecturerAcademicDegreeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerAcademicRankId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerPostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerPostRate")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("MobileNumber")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Patronymic")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicDegreeId");
+
+ b.HasIndex("LecturerAcademicRankId");
+
+ b.HasIndex("LecturerPostId");
+
+ b.HasIndex("UserId");
+
+ b.HasIndex("FirstName", "LastName", "Patronymic")
+ .IsUnique()
+ .HasFilter("[Patronymic] IS NOT NULL");
+
+ b.ToTable("Lecturers");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicDegree", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LecturerAcademicDegreeName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicDegreeName")
+ .IsUnique();
+
+ b.ToTable("LecturerAcademicDegrees");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LecturerAcademicRankName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicRankName")
+ .IsUnique();
+
+ b.ToTable("LecturerAcademicRanks");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeePostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsExternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("IsInternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("LecturerId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Rate")
+ .HasColumnType("decimal(18,2)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeePostId");
+
+ b.HasIndex("LecturerId");
+
+ b.ToTable("LecturerEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Hours")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LecturerPostName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerPostName")
+ .IsUnique();
+
+ b.ToTable("LecturerPosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AccessOperation")
+ .HasColumnType("int");
+
+ b.Property("AccessType")
+ .HasColumnType("int");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("Accesses");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.EnviromentSetting", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Key")
+ .IsUnique();
+
+ b.ToTable("EnviromentSettings");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("RolePriority")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleName")
+ .IsUnique();
+
+ b.ToTable("Roles");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Avatar")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("CountAttempt")
+ .HasColumnType("int");
+
+ b.Property("DateBanned")
+ .HasColumnType("datetime2");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("DateLastVisit")
+ .HasColumnType("datetime2");
+
+ b.Property("IsBanned")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("PasswordHash")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserName");
+
+ b.ToTable("Users");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("RoleId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("UserRoles");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
+ .WithMany("Classrooms")
+ .HasForeignKey("EmployeeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Employee");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Department.DisciplineBlock", "DisciplineBlock")
+ .WithMany("Disciplines")
+ .HasForeignKey("DisciplineBlockId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("DisciplineBlock");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Security.User", "User")
+ .WithMany("Employees")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeeEmployeePost", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Department.Employee", "Employee")
+ .WithMany("EmployeeEmployeePosts")
+ .HasForeignKey("EmployeeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("DatabaseCore.Models.Department.EmployeePost", "EmployeePost")
+ .WithMany("EmployeeEmployeePosts")
+ .HasForeignKey("EmployeePostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Employee");
+
+ b.Navigation("EmployeePost");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Department.LecturerAcademicDegree", "LecturerAcademicDegree")
+ .WithMany("Lecturers")
+ .HasForeignKey("LecturerAcademicDegreeId");
+
+ b.HasOne("DatabaseCore.Models.Department.LecturerAcademicRank", "LecturerAcademicRank")
+ .WithMany("Lecturers")
+ .HasForeignKey("LecturerAcademicRankId");
+
+ b.HasOne("DatabaseCore.Models.Department.LecturerPost", "LecturerPost")
+ .WithMany("Lecturers")
+ .HasForeignKey("LecturerPostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("DatabaseCore.Models.Security.User", "User")
+ .WithMany("Lecturers")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("LecturerAcademicDegree");
+
+ b.Navigation("LecturerAcademicRank");
+
+ b.Navigation("LecturerPost");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Department.EmployeePost", "EmployeePost")
+ .WithMany()
+ .HasForeignKey("EmployeePostId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("DatabaseCore.Models.Department.Lecturer", "Lecturer")
+ .WithMany()
+ .HasForeignKey("LecturerId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("EmployeePost");
+
+ b.Navigation("Lecturer");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.Access", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Security.Role", "Role")
+ .WithMany("Access")
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Role");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.UserRole", b =>
+ {
+ b.HasOne("DatabaseCore.Models.Security.Role", "Role")
+ .WithMany("UserRoles")
+ .HasForeignKey("RoleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("DatabaseCore.Models.Security.User", "User")
+ .WithMany("UserRoles")
+ .HasForeignKey("UserId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Role");
+
+ b.Navigation("User");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
+ {
+ b.Navigation("Disciplines");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
+ {
+ b.Navigation("Classrooms");
+
+ b.Navigation("EmployeeEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeePost", b =>
+ {
+ b.Navigation("EmployeeEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicDegree", b =>
+ {
+ b.Navigation("Lecturers");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b =>
+ {
+ b.Navigation("Lecturers");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b =>
+ {
+ b.Navigation("Lecturers");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.Role", b =>
+ {
+ b.Navigation("Access");
+
+ b.Navigation("UserRoles");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Security.User", b =>
+ {
+ b.Navigation("Employees");
+
+ b.Navigation("Lecturers");
+
+ b.Navigation("UserRoles");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.cs
new file mode 100644
index 0000000..b1b350e
--- /dev/null
+++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404065039_AddDiciplineDescription.cs
@@ -0,0 +1,23 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace DatabaseCore.Migrations
+{
+ public partial class AddDiciplineDescription : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "Description",
+ table: "Disciplines",
+ type: "nvarchar(max)",
+ nullable: true);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "Description",
+ table: "Disciplines");
+ }
+ }
+}
diff --git a/DepartmentPortal/Common/DatabaseCore/Migrations/20210404070556_AddLecturer.Designer.cs b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404070556_AddLecturer.Designer.cs
new file mode 100644
index 0000000..11d3cc2
--- /dev/null
+++ b/DepartmentPortal/Common/DatabaseCore/Migrations/20210404070556_AddLecturer.Designer.cs
@@ -0,0 +1,838 @@
+//
+using System;
+using DatabaseCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+namespace DatabaseCore.Migrations
+{
+ [DbContext(typeof(DatabaseContext))]
+ [Migration("20210404070556_AddLecturer")]
+ partial class AddLecturer
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.4")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Classroom", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Capacity")
+ .HasColumnType("int");
+
+ b.Property("ClassroomType")
+ .HasColumnType("int");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("EmployeeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("HaveProjector")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Number")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("SecurityCode")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Square")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("Title")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeeId");
+
+ b.HasIndex("Number")
+ .IsUnique()
+ .HasFilter("[Number] IS NOT NULL");
+
+ b.ToTable("Classrooms");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Discipline", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineBlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DisciplineBlueAsteriskName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("DisciplineShortName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.HasKey("Id");
+
+ b.HasIndex("DisciplineBlockId");
+
+ b.HasIndex("DisciplineName")
+ .IsUnique();
+
+ b.ToTable("Disciplines");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.DisciplineBlock", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("DisciplineBlockBlueAsteriskName")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DisciplineBlockOrder")
+ .HasColumnType("int");
+
+ b.Property("DisciplineBlockUseForGrouping")
+ .HasColumnType("bit");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Title")
+ .IsUnique();
+
+ b.ToTable("DisciplineBlocks");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Employee", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Address")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DateBirth")
+ .HasColumnType("datetime2");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FirstName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("GroupElectricalSafety")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HomeNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("MobileNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Patronymic")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.HasIndex("FirstName", "LastName", "Patronymic")
+ .IsUnique()
+ .HasFilter("[FirstName] IS NOT NULL AND [LastName] IS NOT NULL AND [Patronymic] IS NOT NULL");
+
+ b.ToTable("Employees");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeeEmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EmployeePostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsExternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("IsInternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("Rate")
+ .HasColumnType("decimal(18,2)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeeId");
+
+ b.HasIndex("EmployeePostId");
+
+ b.ToTable("EmployeeEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.EmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeePostName")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeePostName")
+ .IsUnique()
+ .HasFilter("[EmployeePostName] IS NOT NULL");
+
+ b.ToTable("EmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.Lecturer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Abbreviation")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Address")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("DateBirth")
+ .HasColumnType("datetime2");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("GroupElectricalSafety")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("HomeNumber")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LastName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("LecturerAcademicDegreeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerAcademicRankId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerPostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LecturerPostRate")
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("MobileNumber")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Patronymic")
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Photo")
+ .HasColumnType("varbinary(max)");
+
+ b.Property("UserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicDegreeId");
+
+ b.HasIndex("LecturerAcademicRankId");
+
+ b.HasIndex("LecturerPostId");
+
+ b.HasIndex("UserId");
+
+ b.HasIndex("FirstName", "LastName", "Patronymic")
+ .IsUnique()
+ .HasFilter("[Patronymic] IS NOT NULL");
+
+ b.ToTable("Lecturers");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicDegree", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LecturerAcademicDegreeName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicDegreeName")
+ .IsUnique();
+
+ b.ToTable("LecturerAcademicDegrees");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerAcademicRank", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("LecturerAcademicRankName")
+ .IsRequired()
+ .HasColumnType("nvarchar(450)");
+
+ b.Property("Order")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("LecturerAcademicRankName")
+ .IsUnique();
+
+ b.ToTable("LecturerAcademicRanks");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerEmployeePost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property("EmployeePostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsExternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("IsInternalCombination")
+ .HasColumnType("bit");
+
+ b.Property("LecturerId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Rate")
+ .HasColumnType("decimal(18,2)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EmployeePostId");
+
+ b.HasIndex("LecturerId");
+
+ b.ToTable("LecturerEmployeePosts");
+ });
+
+ modelBuilder.Entity("DatabaseCore.Models.Department.LecturerPost", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DateCreate")
+ .HasColumnType("datetime2");
+
+ b.Property("DateDelete")
+ .HasColumnType("datetime2");
+
+ b.Property