473 lines
17 KiB
C#
473 lines
17 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using UniversityDatabaseImplement;
|
|
|
|
#nullable disable
|
|
|
|
namespace UniversityDatabaseImplement.Migrations
|
|
{
|
|
[DbContext(typeof(UniversityDatabase))]
|
|
partial class UniversityDatabaseModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.4")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Attestation", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("FormOfEvaluation")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("Score")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("StudentId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("StudentName")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Attestations");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Disciplines");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudy", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateOnly>("Date")
|
|
.HasColumnType("date");
|
|
|
|
b.Property<string>("FormOfStudy")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Profile")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("PlanOfStudys");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudyTeacher", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("PlanOfStudyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PlanOfStudyId");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.ToTable("PlanOfStudyTeachers");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Statement", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Statements");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Student", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("PlanOfStudyId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("PlanOfStudyProfile")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("PlanOfStudyId");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Students");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.StudentDiscipline", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("DisciplineId")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<int>("StudentId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DisciplineId");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("StudentDisciplines");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Teacher", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("AcademicDegree")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("Position")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<int>("UserId")
|
|
.HasColumnType("int");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("Teachers");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.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>("Login")
|
|
.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("UniversityDatabaseImplement.Models.Attestation", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.Student", "Student")
|
|
.WithMany("Attestations")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("Attestations")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Student");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.Teacher", "Teacher")
|
|
.WithMany("Disciplines")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("Disciplines")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Teacher");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudy", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("PlanOfStudys")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudyTeacher", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.PlanOfStudy", "PlanOfStudy")
|
|
.WithMany("Teachers")
|
|
.HasForeignKey("PlanOfStudyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.Teacher", "Teacher")
|
|
.WithMany("PlanOfStudyTeachers")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("PlanOfStudy");
|
|
|
|
b.Navigation("Teacher");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Statement", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.Teacher", "Teacher")
|
|
.WithMany("Statements")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("Statements")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Teacher");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Student", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.PlanOfStudy", "PlanOfStudy")
|
|
.WithMany("Students")
|
|
.HasForeignKey("PlanOfStudyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("Students")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("PlanOfStudy");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.StudentDiscipline", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.Discipline", "Discipline")
|
|
.WithMany("Students")
|
|
.HasForeignKey("DisciplineId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("UniversityDatabaseImplement.Models.Student", "Student")
|
|
.WithMany("StudentDiscipline")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Discipline");
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Teacher", b =>
|
|
{
|
|
b.HasOne("UniversityDatabaseImplement.Models.User", "User")
|
|
.WithMany("Teachers")
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b =>
|
|
{
|
|
b.Navigation("Students");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudy", b =>
|
|
{
|
|
b.Navigation("Students");
|
|
|
|
b.Navigation("Teachers");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Student", b =>
|
|
{
|
|
b.Navigation("Attestations");
|
|
|
|
b.Navigation("StudentDiscipline");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.Teacher", b =>
|
|
{
|
|
b.Navigation("Disciplines");
|
|
|
|
b.Navigation("PlanOfStudyTeachers");
|
|
|
|
b.Navigation("Statements");
|
|
});
|
|
|
|
modelBuilder.Entity("UniversityDatabaseImplement.Models.User", b =>
|
|
{
|
|
b.Navigation("Attestations");
|
|
|
|
b.Navigation("Disciplines");
|
|
|
|
b.Navigation("PlanOfStudys");
|
|
|
|
b.Navigation("Statements");
|
|
|
|
b.Navigation("Students");
|
|
|
|
b.Navigation("Teachers");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|