596 lines
21 KiB
C#
596 lines
21 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|
using SchoolAgainStudyDataBaseImplements;
|
|
|
|
#nullable disable
|
|
|
|
namespace SchoolAgainStudyDataBaseImplements.Migrations
|
|
{
|
|
[DbContext(typeof(SchoolDataBase))]
|
|
partial class SchoolDataBaseModelSnapshot : 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("SchoolAgainStudyDataBaseImplements.Models.Diy", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("StudentId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("StudentName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("TaskId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("TaskName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.HasIndex("TaskId");
|
|
|
|
b.ToTable("Diys");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.DiyInterest", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("DiyId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("InterestId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("DiyId");
|
|
|
|
b.HasIndex("InterestId");
|
|
|
|
b.ToTable("DiyInterests");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Interest", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("StudentId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("Interests");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Lesson", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("DateEvent")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("ProductId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("ProductName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("TeacherName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.ToTable("Lessons");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.LessonMaterial", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("LessonId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("MaterialId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("LessonId");
|
|
|
|
b.HasIndex("MaterialId");
|
|
|
|
b.ToTable("LessonMaterials");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Material", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("SphereUse")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.ToTable("Materials");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Product", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("DateCreate")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("StudentId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("StudentName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.ProductInterest", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("InterestId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ProductId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("InterestId");
|
|
|
|
b.HasIndex("ProductId");
|
|
|
|
b.ToTable("ProductInterests");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Student", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("Class")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Login")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Students");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Task", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<DateTime>("DateDelivery")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<DateTime>("DateIssue")
|
|
.HasColumnType("timestamp with time zone");
|
|
|
|
b.Property<int>("TeacherId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("TeacherName")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.ToTable("Tasks");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.TaskMaterial", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<int>("MaterialId")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("TaskId")
|
|
.HasColumnType("integer");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("MaterialId");
|
|
|
|
b.HasIndex("TaskId");
|
|
|
|
b.ToTable("TaskMaterials");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Teacher", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("integer");
|
|
|
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("Login")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Phone")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<string>("Post")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Teachers");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Diy", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Student", "Student")
|
|
.WithMany("Diys")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Task", "Task")
|
|
.WithMany("Diys")
|
|
.HasForeignKey("TaskId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Student");
|
|
|
|
b.Navigation("Task");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.DiyInterest", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Diy", "Diy")
|
|
.WithMany("Interests")
|
|
.HasForeignKey("DiyId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Interest", "Interest")
|
|
.WithMany("DiyInterests")
|
|
.HasForeignKey("InterestId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Diy");
|
|
|
|
b.Navigation("Interest");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Interest", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Student", "Student")
|
|
.WithMany("Interests")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Lesson", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Product", "Product")
|
|
.WithMany("Lessons")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Teacher", "Teacher")
|
|
.WithMany("Lessons")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Product");
|
|
|
|
b.Navigation("Teacher");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.LessonMaterial", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Lesson", "Lesson")
|
|
.WithMany("Materials")
|
|
.HasForeignKey("LessonId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Material", "Material")
|
|
.WithMany("LessonMaterials")
|
|
.HasForeignKey("MaterialId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Lesson");
|
|
|
|
b.Navigation("Material");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Material", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Teacher", "Teacher")
|
|
.WithMany("Materials")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Teacher");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Product", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Student", "Student")
|
|
.WithMany("Products")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.ProductInterest", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Interest", "Interest")
|
|
.WithMany("ProductInterests")
|
|
.HasForeignKey("InterestId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Product", "Product")
|
|
.WithMany("Interests")
|
|
.HasForeignKey("ProductId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Interest");
|
|
|
|
b.Navigation("Product");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Task", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Teacher", "Teacher")
|
|
.WithMany("Tasks")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Teacher");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.TaskMaterial", b =>
|
|
{
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Material", "Material")
|
|
.WithMany("TaskMaterial")
|
|
.HasForeignKey("MaterialId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("SchoolAgainStudyDataBaseImplements.Models.Task", "Task")
|
|
.WithMany("Materials")
|
|
.HasForeignKey("TaskId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Material");
|
|
|
|
b.Navigation("Task");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Diy", b =>
|
|
{
|
|
b.Navigation("Interests");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Interest", b =>
|
|
{
|
|
b.Navigation("DiyInterests");
|
|
|
|
b.Navigation("ProductInterests");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Lesson", b =>
|
|
{
|
|
b.Navigation("Materials");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Material", b =>
|
|
{
|
|
b.Navigation("LessonMaterials");
|
|
|
|
b.Navigation("TaskMaterial");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Product", b =>
|
|
{
|
|
b.Navigation("Interests");
|
|
|
|
b.Navigation("Lessons");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Student", b =>
|
|
{
|
|
b.Navigation("Diys");
|
|
|
|
b.Navigation("Interests");
|
|
|
|
b.Navigation("Products");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Task", b =>
|
|
{
|
|
b.Navigation("Diys");
|
|
|
|
b.Navigation("Materials");
|
|
});
|
|
|
|
modelBuilder.Entity("SchoolAgainStudyDataBaseImplements.Models.Teacher", b =>
|
|
{
|
|
b.Navigation("Lessons");
|
|
|
|
b.Navigation("Materials");
|
|
|
|
b.Navigation("Tasks");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|