// 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("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("FormOfEvaluation") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Score") .HasColumnType("int"); b.Property("StudentId") .HasColumnType("int"); b.Property("StudentName") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("StudentId"); b.HasIndex("UserId"); b.ToTable("Attestations"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.Discipline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Date") .HasColumnType("date"); b.Property("Description") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TeacherId") .HasColumnType("int"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("TeacherId"); b.HasIndex("UserId"); b.ToTable("Disciplines"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudy", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Date") .HasColumnType("date"); b.Property("FormOfStudy") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Profile") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("PlanOfStudys"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.PlanOfStudyTeacher", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("PlanOfStudyId") .HasColumnType("int"); b.Property("TeacherId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("PlanOfStudyId"); b.HasIndex("TeacherId"); b.ToTable("PlanOfStudyTeachers"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.Statement", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Date") .HasColumnType("datetime2"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TeacherId") .HasColumnType("int"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("TeacherId"); b.HasIndex("UserId"); b.ToTable("Statements"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.Student", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("PlanOfStudyId") .HasColumnType("int"); b.Property("PlanOfStudyProfile") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("PlanOfStudyId"); b.HasIndex("UserId"); b.ToTable("Students"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.StudentDiscipline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("DisciplineId") .HasColumnType("int"); b.Property("StudentId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("DisciplineId"); b.HasIndex("StudentId"); b.ToTable("StudentDisciplines"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.Teacher", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("AcademicDegree") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Name") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Position") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Teachers"); }); modelBuilder.Entity("UniversityDatabaseImplement.Models.User", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("int"); SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); b.Property("Email") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Login") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Password") .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("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 } } }