// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using SchoolDatabaseImplement; #nullable disable namespace UniversityDatabaseImplement.Migrations { [DbContext(typeof(SchoolDB))] partial class SchoolDBModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "7.0.4") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("SchoolDatabaseImplement.Models.Account", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("StudentByDisciplineId") .HasColumnType("integer"); b.Property("DateOfAccount") .HasColumnType("date"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("StudentByDisciplineId"); b.ToTable("Accounts"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Student", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Course") .HasColumnType("integer"); b.Property("ExecutorId") .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("ExecutorId"); b.ToTable("Students"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.StudentByDiscipline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("StudentId") .HasColumnType("integer"); b.Property("DateOfStudent") .HasColumnType("timestamp with time zone"); b.Property("DisciplineId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("StudentId"); b.HasIndex("DisciplineId"); b.ToTable("StudentsByDisciplines"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Executor", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("FirstName") .IsRequired() .HasColumnType("text"); b.Property("LastName") .IsRequired() .HasColumnType("text"); b.Property("Login") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Executors"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Discipline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("DateOfPassage") .HasColumnType("date"); b.Property("DateOfReceipt") .HasColumnType("date"); b.Property("ImplementerId") .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("ImplementerId"); b.ToTable("Disciplines"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Implementer", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("FirstName") .IsRequired() .HasColumnType("text"); b.Property("LastName") .IsRequired() .HasColumnType("text"); b.Property("Login") .IsRequired() .HasColumnType("text"); b.Property("Password") .IsRequired() .HasColumnType("text"); b.Property("PhoneNumber") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Implementers"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Requirement", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("ExecutorId") .HasColumnType("integer"); b.Property("NameOfRequirement") .IsRequired() .HasColumnType("text"); b.Property("Price") .HasColumnType("double precision"); b.HasKey("Id"); b.HasIndex("ExecutorId"); b.ToTable("Requirements"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.RequirementByDiscipline", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Count") .HasColumnType("integer"); b.Property("DisciplineId") .HasColumnType("integer"); b.Property("RequirementId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("DisciplineId"); b.HasIndex("RequirementId"); b.ToTable("RequirementByDisciplines"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Account", b => { b.HasOne("UniversityDatabaseImplement.Models.StudentByDiscipline", "StudentByDiscipline") .WithMany("Accounts") .HasForeignKey("StudentByDisciplineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("StudentByDiscipline"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Student", b => { b.HasOne("UniversityDatabaseImplement.Models.Executor", "Executor") .WithMany("Students") .HasForeignKey("ExecutorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Executor"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.StudentByDiscipline", b => { b.HasOne("SchoolDatabaseImplement.Models.Student", "Student") .WithMany("Disciplines") .HasForeignKey("StudentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("SchoolDatabaseImplement.Models.Discipline", "Discipline") .WithMany("Students") .HasForeignKey("DisciplineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Student"); b.Navigation("Discipline"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Discipline", b => { b.HasOne("UniversityDatabaseImplement.Models.Implementer", "Student") .WithMany("Disciplines") .HasForeignKey("ImplementerId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Student"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Requirement", b => { b.HasOne("UniversityDatabaseImplement.Models.Executor", "Executor") .WithMany("Requirements") .HasForeignKey("ExecutorId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Executor"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.RequirementByDiscipline", b => { b.HasOne("UniversityDatabaseImplement.Models.Discipline", "Discipline") .WithMany("Requirements") .HasForeignKey("DisciplineId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("UniversityDatabaseImplement.Models.Requirement", "Requirement") .WithMany("Disciplines") .HasForeignKey("RequirementId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Discipline"); b.Navigation("Requirement"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Student", b => { b.Navigation("Disciplines"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.StudentByDiscipline", b => { b.Navigation("Accounts"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Executor", b => { b.Navigation("Students"); b.Navigation("Requirements"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Discipline", b => { b.Navigation("Students"); b.Navigation("Requirements"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Implementer", b => { b.Navigation("Disciplines"); }); modelBuilder.Entity("SchoolDatabaseImplement.Models.Requirement", b => { b.Navigation("Disciplines"); }); #pragma warning restore 612, 618 } } }