DepartmentProject/DepartmentPortal/Common/CoreDatabase/Migrations/DatabaseContextModelSnapshot.cs

1525 lines
53 KiB
C#
Raw Normal View History

2022-03-18 22:55:48 +04:00
// <auto-generated />
using System;
using CoreDatabase;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace CoreDatabase.Migrations
{
[DbContext(typeof(DatabaseContext))]
partial class DatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("ProductVersion", "5.0.15")
2022-03-18 22:55:48 +04:00
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlan", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid?>("EducationDirectionId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime>("LastUpdateDate")
.HasColumnType("datetime2");
2022-03-18 22:55:48 +04:00
2022-12-16 17:43:23 +04:00
b.Property<int>("YearStart")
.HasColumnType("int");
2022-03-18 22:55:48 +04:00
b.HasKey("Id");
2022-12-16 17:43:23 +04:00
b.HasIndex("EducationDirectionId", "YearStart")
2022-03-18 22:55:48 +04:00
.IsUnique()
.HasFilter("[EducationDirectionId] IS NOT NULL");
b.ToTable("AcademicPlans");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlanRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AcademicPlanId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("AcademicPlanRecordParentId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid>("DisciplineId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("InDepartment")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsFacultative")
.HasColumnType("bit");
b.Property<bool>("IsParent")
.HasColumnType("bit");
b.Property<int>("Semester")
.HasColumnType("int");
b.Property<int>("Zet")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("DisciplineId");
b.HasIndex("AcademicPlanId", "DisciplineId", "Semester")
.IsUnique();
b.ToTable("AcademicPlanRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlanRecordTimeNormHour", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("AcademicPlanRecordId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<decimal>("PlanHours")
.HasColumnType("decimal(18,2)");
b.Property<Guid>("TimeNormId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("TimeNormId");
b.HasIndex("AcademicPlanRecordId", "TimeNormId")
.IsUnique();
b.ToTable("AcademicPlanRecordTimeNormHours");
});
2022-03-27 14:51:27 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.BasicDepartment", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("BasicDepartmentDescription")
.HasColumnType("nvarchar(max)");
b.Property<string>("BasicDepartmentName")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("EnterprisesName")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid?>("LecturerId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("LecturerId");
b.ToTable("BasicDepartment");
});
2022-03-18 22:55:48 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.Classroom", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("Capacity")
.HasColumnType("int");
b.Property<int>("ClassroomType")
.HasColumnType("int");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("HaveProjector")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("Number")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<string>("SecurityCode")
.HasColumnType("nvarchar(max)");
b.Property<decimal>("Square")
.HasColumnType("decimal(18,2)");
b.Property<string>("Title")
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.HasIndex("Number")
.IsUnique();
b.ToTable("Classrooms");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Discipline", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
2022-03-27 14:51:27 +04:00
b.Property<Guid?>("BasicDepartmentId")
.HasColumnType("uniqueidentifier");
2022-03-18 22:55:48 +04:00
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<Guid>("DisciplineBlockId")
.HasColumnType("uniqueidentifier");
b.Property<string>("DisciplineBlueAsteriskName")
.HasColumnType("nvarchar(max)");
b.Property<string>("DisciplineName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("DisciplineShortName")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.HasKey("Id");
2022-03-27 14:51:27 +04:00
b.HasIndex("BasicDepartmentId");
2022-03-18 22:55:48 +04:00
b.HasIndex("DisciplineBlockId");
b.HasIndex("DisciplineName")
.IsUnique();
b.ToTable("Disciplines");
});
modelBuilder.Entity("CoreDatabase.Models.Department.DisciplineBlock", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("DisciplineBlockBlueAsteriskName")
.HasColumnType("nvarchar(max)");
b.Property<int>("DisciplineBlockOrder")
.HasColumnType("int");
b.Property<bool>("DisciplineBlockUseForGrouping")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("Title")
.IsUnique();
b.ToTable("DisciplineBlocks");
});
modelBuilder.Entity("CoreDatabase.Models.Department.EducationDirection", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Cipher")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("LecturerId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Profile")
.HasColumnType("nvarchar(450)");
b.Property<int>("Qualification")
.HasColumnType("int");
b.Property<string>("ShortName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("LecturerId");
b.HasIndex("Title", "Profile")
.IsUnique()
.HasFilter("[Profile] IS NOT NULL");
b.ToTable("EducationDirections");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Employee", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Address")
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateBirth")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.HasColumnType("nvarchar(450)");
b.Property<string>("GroupElectricalSafety")
.HasColumnType("nvarchar(max)");
b.Property<string>("HomeNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LastName")
.HasColumnType("nvarchar(450)");
b.Property<string>("MobileNumber")
.HasColumnType("nvarchar(max)");
b.Property<string>("Patronymic")
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<Guid>("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("CoreDatabase.Models.Department.EmployeePost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid>("EmployeeId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsExternalCombination")
.HasColumnType("bit");
b.Property<bool>("IsInternalCombination")
.HasColumnType("bit");
b.Property<Guid>("PostId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Rate")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.HasIndex("PostId");
b.ToTable("EmployeePosts");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Lecturer", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Abbreviation")
.HasColumnType("nvarchar(max)");
b.Property<string>("Address")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("DateBirth")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("GroupElectricalSafety")
.HasColumnType("nvarchar(max)");
b.Property<string>("HomeNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<Guid?>("LecturerAcademicDegreeId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("LecturerAcademicRankId")
.HasColumnType("uniqueidentifier");
b.Property<string>("MobileNumber")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool>("OnlyForPrivate")
.HasColumnType("bit");
b.Property<string>("Patronymic")
.HasColumnType("nvarchar(450)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("LecturerAcademicDegreeId");
b.HasIndex("LecturerAcademicRankId");
b.HasIndex("UserId");
b.HasIndex("FirstName", "LastName", "Patronymic")
.IsUnique()
.HasFilter("[Patronymic] IS NOT NULL");
b.ToTable("Lecturers");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerAcademicDegree", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LecturerAcademicDegreeName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LecturerAcademicDegreeName")
.IsUnique();
b.ToTable("LecturerAcademicDegrees");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerAcademicRank", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("LecturerAcademicRankName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("Order")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("LecturerAcademicRankName")
.IsUnique();
b.ToTable("LecturerAcademicRanks");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerPost", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsExternalCombination")
.HasColumnType("bit");
b.Property<bool>("IsInternalCombination")
.HasColumnType("bit");
b.Property<Guid>("LecturerId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("PostId")
.HasColumnType("uniqueidentifier");
b.Property<decimal>("Rate")
.HasColumnType("decimal(18,2)");
b.HasKey("Id");
b.HasIndex("LecturerId");
b.HasIndex("PostId");
b.ToTable("LecturerPosts");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Order", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<DateTime>("OrderDate")
.HasColumnType("datetime2");
b.Property<string>("OrderNumber")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("OrderType")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("OrderNumber", "OrderDate", "OrderType")
2022-03-18 22:55:48 +04:00
.IsUnique();
b.ToTable("Orders");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderStudentRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Info")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("OrderId")
.HasColumnType("uniqueidentifier");
b.Property<int>("OrderStudentMoveType")
.HasColumnType("int");
b.Property<Guid?>("StudentGroupFromId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("StudentGroupToId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("StudentId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("OrderId");
b.HasIndex("StudentGroupFromId");
b.HasIndex("StudentGroupToId");
b.HasIndex("StudentId", "OrderId")
.IsUnique();
b.ToTable("OrderStudentRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderSyncHistory", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("SyncDate")
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("OrderSyncHistories");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderSyncHistoryRecord", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("Information")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid>("OrderSyncHistoryId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("OrderSyncHistoryId");
b.ToTable("OrderSyncHistoryRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Post", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<int?>("Hours")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<int>("Order")
.HasColumnType("int");
b.Property<string>("PostName")
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("PostName")
.IsUnique()
.HasFilter("[PostName] IS NOT NULL");
b.ToTable("Posts");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Student", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
2022-03-27 14:51:27 +04:00
b.Property<Guid?>("BasicDepartmentId")
.HasColumnType("uniqueidentifier");
2022-03-18 22:55:48 +04:00
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<string>("Email")
.HasColumnType("nvarchar(max)");
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Iduniv")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<bool>("IsSteward")
.HasColumnType("bit");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("NumberOfBook")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("Patronymic")
.HasColumnType("nvarchar(max)");
b.Property<byte[]>("Photo")
.HasColumnType("varbinary(max)");
b.Property<Guid?>("StudentGroupId")
.HasColumnType("uniqueidentifier");
b.Property<int>("StudentState")
.HasColumnType("int");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
2022-03-27 14:51:27 +04:00
b.HasIndex("BasicDepartmentId");
2022-03-18 22:55:48 +04:00
b.HasIndex("NumberOfBook")
.IsUnique();
b.HasIndex("StudentGroupId");
b.HasIndex("UserId");
b.ToTable("Students");
});
modelBuilder.Entity("CoreDatabase.Models.Department.StudentGroup", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
2022-12-16 17:43:23 +04:00
b.Property<Guid>("AcademicPlanId")
.HasColumnType("uniqueidentifier");
2022-03-18 22:55:48 +04:00
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<int>("GroupNumber")
.HasColumnType("int");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid?>("LecturerId")
.HasColumnType("uniqueidentifier");
2022-12-16 17:43:23 +04:00
b.Property<int>("YearEntrance")
.HasColumnType("int");
b.Property<int>("YearFinish")
.HasColumnType("int");
2022-03-18 22:55:48 +04:00
b.HasKey("Id");
b.HasIndex("LecturerId");
2022-12-16 17:43:23 +04:00
b.HasIndex("AcademicPlanId", "YearEntrance", "GroupNumber")
2022-03-18 22:55:48 +04:00
.IsUnique();
b.ToTable("StudentGroups");
});
modelBuilder.Entity("CoreDatabase.Models.Department.TimeNorm", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<Guid>("DisciplineBlockId")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("KindOfLoadAttributeName")
.HasColumnType("nvarchar(max)");
b.Property<string>("KindOfLoadBlueAsteriskAttributeName")
.HasColumnType("nvarchar(max)");
b.Property<string>("KindOfLoadBlueAsteriskName")
.HasColumnType("nvarchar(max)");
b.Property<string>("KindOfLoadBlueAsteriskPracticName")
.HasColumnType("nvarchar(max)");
b.Property<string>("KindOfLoadName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int?>("TimeNormEducationDirectionQualification")
.HasColumnType("int");
b.Property<string>("TimeNormName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("TimeNormOrder")
.HasColumnType("int");
b.Property<string>("TimeNormShortName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<bool>("UseInLearningProgress")
.HasColumnType("bit");
b.Property<bool>("UseInSite")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("DisciplineBlockId");
b.HasIndex("TimeNormName", "TimeNormShortName")
.IsUnique();
b.ToTable("TimeNorms");
});
modelBuilder.Entity("CoreDatabase.Models.Security.Access", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<int>("AccessOperation")
.HasColumnType("int");
b.Property<int>("AccessType")
.HasColumnType("int");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("Accesses");
});
modelBuilder.Entity("CoreDatabase.Models.Security.EnviromentSetting", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("Key")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("EnviromentSettings");
});
modelBuilder.Entity("CoreDatabase.Models.Security.Role", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("RoleName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.Property<int>("RolePriority")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("RoleName")
.IsUnique();
b.ToTable("Roles");
});
modelBuilder.Entity("CoreDatabase.Models.Security.User", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<byte[]>("Avatar")
.HasColumnType("varbinary(max)");
b.Property<int>("CountAttempt")
.HasColumnType("int");
b.Property<DateTime?>("DateBanned")
.HasColumnType("datetime2");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateLastVisit")
.HasColumnType("datetime2");
b.Property<bool>("IsBanned")
.HasColumnType("bit");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<string>("PasswordHash")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("nvarchar(450)");
b.HasKey("Id");
b.HasIndex("UserName");
b.ToTable("Users");
});
modelBuilder.Entity("CoreDatabase.Models.Security.UserRole", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DateCreate")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateDelete")
.HasColumnType("datetime2");
b.Property<bool>("IsDeleted")
.HasColumnType("bit");
b.Property<Guid>("RoleId")
.HasColumnType("uniqueidentifier");
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.HasKey("Id");
b.HasIndex("RoleId");
b.HasIndex("UserId");
b.ToTable("UserRoles");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlan", b =>
{
b.HasOne("CoreDatabase.Models.Department.EducationDirection", "EducationDirection")
.WithMany("AcademicPlans")
.HasForeignKey("EducationDirectionId");
b.Navigation("EducationDirection");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlanRecord", b =>
{
b.HasOne("CoreDatabase.Models.Department.AcademicPlan", "AcademicPlan")
.WithMany("AcademicPlanRecords")
.HasForeignKey("AcademicPlanId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.Discipline", "Discipline")
.WithMany("AcademicPlanRecords")
.HasForeignKey("DisciplineId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("AcademicPlan");
b.Navigation("Discipline");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlanRecordTimeNormHour", b =>
{
b.HasOne("CoreDatabase.Models.Department.AcademicPlanRecord", "AcademicPlanRecord")
.WithMany("AcademicPlanRecordTimeNormHours")
.HasForeignKey("AcademicPlanRecordId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.TimeNorm", "TimeNorm")
.WithMany("AcademicPlanRecordTimeNormHours")
.HasForeignKey("TimeNormId")
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
b.Navigation("AcademicPlanRecord");
b.Navigation("TimeNorm");
});
2022-03-27 14:51:27 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.BasicDepartment", b =>
{
b.HasOne("CoreDatabase.Models.Department.Lecturer", "Lecturer")
.WithMany("BasicDepartments")
.HasForeignKey("LecturerId");
b.Navigation("Lecturer");
});
2022-03-18 22:55:48 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.Classroom", b =>
{
b.HasOne("CoreDatabase.Models.Department.Employee", "Employee")
.WithMany("Classrooms")
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Discipline", b =>
{
2022-03-27 14:51:27 +04:00
b.HasOne("CoreDatabase.Models.Department.BasicDepartment", "BasicDepartment")
.WithMany("Disciplines")
.HasForeignKey("BasicDepartmentId");
2022-03-18 22:55:48 +04:00
b.HasOne("CoreDatabase.Models.Department.DisciplineBlock", "DisciplineBlock")
.WithMany("Disciplines")
.HasForeignKey("DisciplineBlockId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2022-03-27 14:51:27 +04:00
b.Navigation("BasicDepartment");
2022-03-18 22:55:48 +04:00
b.Navigation("DisciplineBlock");
});
modelBuilder.Entity("CoreDatabase.Models.Department.EducationDirection", b =>
{
b.HasOne("CoreDatabase.Models.Department.Lecturer", "Lecturer")
.WithMany("EducationDirections")
.HasForeignKey("LecturerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Lecturer");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Employee", b =>
{
b.HasOne("CoreDatabase.Models.Security.User", "User")
.WithMany("Employees")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("User");
});
modelBuilder.Entity("CoreDatabase.Models.Department.EmployeePost", b =>
{
b.HasOne("CoreDatabase.Models.Department.Employee", "Employee")
.WithMany("EmployeePosts")
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.Post", "Post")
.WithMany("EmployeePosts")
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
b.Navigation("Post");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Lecturer", b =>
{
b.HasOne("CoreDatabase.Models.Department.LecturerAcademicDegree", "LecturerAcademicDegree")
.WithMany("Lecturers")
.HasForeignKey("LecturerAcademicDegreeId");
b.HasOne("CoreDatabase.Models.Department.LecturerAcademicRank", "LecturerAcademicRank")
.WithMany("Lecturers")
.HasForeignKey("LecturerAcademicRankId");
b.HasOne("CoreDatabase.Models.Security.User", "User")
.WithMany("Lecturers")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("LecturerAcademicDegree");
b.Navigation("LecturerAcademicRank");
b.Navigation("User");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerPost", b =>
{
b.HasOne("CoreDatabase.Models.Department.Lecturer", "Lecturer")
.WithMany("LecturerPosts")
.HasForeignKey("LecturerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.Post", "Post")
.WithMany("LecturerPosts")
.HasForeignKey("PostId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Lecturer");
b.Navigation("Post");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderStudentRecord", b =>
{
b.HasOne("CoreDatabase.Models.Department.Order", "Order")
.WithMany("OrderStudentRecords")
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.StudentGroup", "StudentGroupFrom")
.WithMany("OrderStudentRecordFroms")
.HasForeignKey("StudentGroupFromId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("CoreDatabase.Models.Department.StudentGroup", "StudentGroupTo")
.WithMany("OrderStudentRecordTos")
.HasForeignKey("StudentGroupToId")
.OnDelete(DeleteBehavior.NoAction);
b.HasOne("CoreDatabase.Models.Department.Student", "Student")
.WithMany("OrderStudentRecords")
.HasForeignKey("StudentId")
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
b.Navigation("Order");
b.Navigation("Student");
b.Navigation("StudentGroupFrom");
b.Navigation("StudentGroupTo");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderSyncHistoryRecord", b =>
{
b.HasOne("CoreDatabase.Models.Department.OrderSyncHistory", "OrderSyncHistory")
.WithMany("OrderSyncHistoryRecords")
.HasForeignKey("OrderSyncHistoryId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("OrderSyncHistory");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Student", b =>
{
2022-03-27 14:51:27 +04:00
b.HasOne("CoreDatabase.Models.Department.BasicDepartment", "BasicDepartment")
.WithMany("Students")
.HasForeignKey("BasicDepartmentId");
2022-03-18 22:55:48 +04:00
b.HasOne("CoreDatabase.Models.Department.StudentGroup", "StudentGroup")
.WithMany("Students")
.HasForeignKey("StudentGroupId");
b.HasOne("CoreDatabase.Models.Security.User", "User")
.WithMany("Students")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2022-03-27 14:51:27 +04:00
b.Navigation("BasicDepartment");
2022-03-18 22:55:48 +04:00
b.Navigation("StudentGroup");
b.Navigation("User");
});
modelBuilder.Entity("CoreDatabase.Models.Department.StudentGroup", b =>
{
2022-12-16 17:43:23 +04:00
b.HasOne("CoreDatabase.Models.Department.AcademicPlan", "AcademicPlan")
2022-03-18 22:55:48 +04:00
.WithMany("StudentGroups")
2022-12-16 17:43:23 +04:00
.HasForeignKey("AcademicPlanId")
2022-03-18 22:55:48 +04:00
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Department.Lecturer", "Lecturer")
.WithMany("StudentGroups")
.HasForeignKey("LecturerId");
2022-12-16 17:43:23 +04:00
b.Navigation("AcademicPlan");
2022-03-18 22:55:48 +04:00
b.Navigation("Lecturer");
});
modelBuilder.Entity("CoreDatabase.Models.Department.TimeNorm", b =>
{
b.HasOne("CoreDatabase.Models.Department.DisciplineBlock", "DisciplineBlock")
.WithMany("TimeNorms")
.HasForeignKey("DisciplineBlockId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("DisciplineBlock");
});
modelBuilder.Entity("CoreDatabase.Models.Security.Access", b =>
{
b.HasOne("CoreDatabase.Models.Security.Role", "Role")
.WithMany("Access")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
});
modelBuilder.Entity("CoreDatabase.Models.Security.UserRole", b =>
{
b.HasOne("CoreDatabase.Models.Security.Role", "Role")
.WithMany("UserRoles")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("CoreDatabase.Models.Security.User", "User")
.WithMany("UserRoles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Role");
b.Navigation("User");
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlan", b =>
{
b.Navigation("AcademicPlanRecords");
2022-12-16 17:43:23 +04:00
b.Navigation("StudentGroups");
2022-03-18 22:55:48 +04:00
});
modelBuilder.Entity("CoreDatabase.Models.Department.AcademicPlanRecord", b =>
{
b.Navigation("AcademicPlanRecordTimeNormHours");
});
2022-03-27 14:51:27 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.BasicDepartment", b =>
{
b.Navigation("Disciplines");
b.Navigation("Students");
});
2022-03-18 22:55:48 +04:00
modelBuilder.Entity("CoreDatabase.Models.Department.Discipline", b =>
{
b.Navigation("AcademicPlanRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.DisciplineBlock", b =>
{
b.Navigation("Disciplines");
b.Navigation("TimeNorms");
});
modelBuilder.Entity("CoreDatabase.Models.Department.EducationDirection", b =>
{
b.Navigation("AcademicPlans");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Employee", b =>
{
b.Navigation("Classrooms");
b.Navigation("EmployeePosts");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Lecturer", b =>
{
2022-03-27 14:51:27 +04:00
b.Navigation("BasicDepartments");
2022-03-18 22:55:48 +04:00
b.Navigation("EducationDirections");
b.Navigation("LecturerPosts");
b.Navigation("StudentGroups");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerAcademicDegree", b =>
{
b.Navigation("Lecturers");
});
modelBuilder.Entity("CoreDatabase.Models.Department.LecturerAcademicRank", b =>
{
b.Navigation("Lecturers");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Order", b =>
{
b.Navigation("OrderStudentRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.OrderSyncHistory", b =>
{
b.Navigation("OrderSyncHistoryRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Post", b =>
{
b.Navigation("EmployeePosts");
b.Navigation("LecturerPosts");
});
modelBuilder.Entity("CoreDatabase.Models.Department.Student", b =>
{
b.Navigation("OrderStudentRecords");
});
modelBuilder.Entity("CoreDatabase.Models.Department.StudentGroup", b =>
{
b.Navigation("OrderStudentRecordFroms");
b.Navigation("OrderStudentRecordTos");
b.Navigation("Students");
});
modelBuilder.Entity("CoreDatabase.Models.Department.TimeNorm", b =>
{
b.Navigation("AcademicPlanRecordTimeNormHours");
});
modelBuilder.Entity("CoreDatabase.Models.Security.Role", b =>
{
b.Navigation("Access");
b.Navigation("UserRoles");
});
modelBuilder.Entity("CoreDatabase.Models.Security.User", b =>
{
b.Navigation("Employees");
b.Navigation("Lecturers");
b.Navigation("Students");
b.Navigation("UserRoles");
});
#pragma warning restore 612, 618
}
}
}