ISEbd-22_CourseWork_School/School/SchoolDataBaseImplement/Migrations/SchoolDBModelSnapshot.cs

370 lines
13 KiB
C#

// <auto-generated />
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("StudentByDisciplineId")
.HasColumnType("integer");
b.Property<DateOnly>("DateOfAccount")
.HasColumnType("date");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("StudentByDisciplineId");
b.ToTable("Accounts");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.Student", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Course")
.HasColumnType("integer");
b.Property<int>("ExecutorId")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ExecutorId");
b.ToTable("Students");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.StudentByDiscipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("StudentId")
.HasColumnType("integer");
b.Property<DateTime>("DateOfStudent")
.HasColumnType("timestamp with time zone");
b.Property<int>("DisciplineId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("StudentId");
b.HasIndex("DisciplineId");
b.ToTable("StudentsByDisciplines");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.Executor", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Executors");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.Discipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateOnly>("DateOfPassage")
.HasColumnType("date");
b.Property<DateOnly>("DateOfReceipt")
.HasColumnType("date");
b.Property<int>("ImplementerId")
.HasColumnType("integer");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ImplementerId");
b.ToTable("Disciplines");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.Implementer", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("FirstName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("LastName")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Login")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Password")
.IsRequired()
.HasColumnType("text");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("Implementers");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.Requirement", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ExecutorId")
.HasColumnType("integer");
b.Property<string>("NameOfRequirement")
.IsRequired()
.HasColumnType("text");
b.Property<double>("Price")
.HasColumnType("double precision");
b.HasKey("Id");
b.HasIndex("ExecutorId");
b.ToTable("Requirements");
});
modelBuilder.Entity("SchoolDatabaseImplement.Models.RequirementByDiscipline", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("Count")
.HasColumnType("integer");
b.Property<int>("DisciplineId")
.HasColumnType("integer");
b.Property<int>("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
}
}
}