// using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; using data.Context; #nullable disable namespace data.Migrations { [DbContext(typeof(ApplicationDbContext))] partial class ApplicationDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "8.0.10") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); modelBuilder.Entity("data.DAO.Attendance", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("LessonId") .HasColumnType("integer"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("StudentId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("LessonId"); b.HasIndex("StudentId"); b.ToTable("Attendances"); }); modelBuilder.Entity("data.DAO.Group", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Groups"); }); modelBuilder.Entity("data.DAO.Lesson", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Date") .HasColumnType("timestamp with time zone"); b.Property("GroupId") .HasColumnType("integer"); b.Property("LessonNumber") .HasColumnType("integer"); b.Property("SemesterId") .HasColumnType("integer"); b.Property("SubjectId") .HasColumnType("integer"); b.HasKey("Id"); b.HasIndex("GroupId"); b.HasIndex("SemesterId"); b.HasIndex("SubjectId"); b.ToTable("Lessons"); }); modelBuilder.Entity("data.DAO.Semester", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Semesters"); }); modelBuilder.Entity("data.DAO.Student", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("GroupId") .HasColumnType("integer"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("GroupId"); b.ToTable("Students"); }); modelBuilder.Entity("data.DAO.Subject", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("integer"); NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); b.Property("Name") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("Subjects"); }); modelBuilder.Entity("data.DAO.Attendance", b => { b.HasOne("data.DAO.Lesson", "Lesson") .WithMany("Attendances") .HasForeignKey("LessonId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("data.DAO.Student", "Student") .WithMany("Attendances") .HasForeignKey("StudentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Lesson"); b.Navigation("Student"); }); modelBuilder.Entity("data.DAO.Lesson", b => { b.HasOne("data.DAO.Group", "Group") .WithMany("Lessons") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("data.DAO.Semester", "Semester") .WithMany("Lessons") .HasForeignKey("SemesterId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("data.DAO.Subject", "Subject") .WithMany("Lessons") .HasForeignKey("SubjectId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); b.Navigation("Semester"); b.Navigation("Subject"); }); modelBuilder.Entity("data.DAO.Student", b => { b.HasOne("data.DAO.Group", "Group") .WithMany("Students") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); }); modelBuilder.Entity("data.DAO.Group", b => { b.Navigation("Lessons"); b.Navigation("Students"); }); modelBuilder.Entity("data.DAO.Lesson", b => { b.Navigation("Attendances"); }); modelBuilder.Entity("data.DAO.Semester", b => { b.Navigation("Lessons"); }); modelBuilder.Entity("data.DAO.Student", b => { b.Navigation("Attendances"); }); modelBuilder.Entity("data.DAO.Subject", b => { b.Navigation("Lessons"); }); #pragma warning restore 612, 618 } } }