202 lines
6.5 KiB
C#
202 lines
6.5 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using StudyLib.API.Data;
|
|
|
|
namespace StudyLib.Migrations
|
|
{
|
|
[DbContext(typeof(StudyLibContext))]
|
|
partial class StudyLibContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.UseIdentityColumns()
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
|
.HasAnnotation("ProductVersion", "5.0.0");
|
|
|
|
modelBuilder.Entity("StudyLib.API.Models.Comment", b =>
|
|
{
|
|
b.Property<long>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.UseIdentityColumn();
|
|
|
|
b.Property<long>("SubjectId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("SubjectId");
|
|
|
|
b.ToTable("Comments");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.API.Models.SubjectDeleteRequest", b =>
|
|
{
|
|
b.Property<long>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.UseIdentityColumn();
|
|
|
|
b.Property<long>("SubjectId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("SubjectId");
|
|
|
|
b.ToTable("SubjectDeleteRequests");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Assignment", b =>
|
|
{
|
|
b.Property<long>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.UseIdentityColumn();
|
|
|
|
b.Property<DateTime>("Deadline")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<double>("FinalMarkPercent")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<long>("SubjectId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("SubjectId");
|
|
|
|
b.ToTable("Assignments");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Subject", b =>
|
|
{
|
|
b.Property<long>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.UseIdentityColumn();
|
|
|
|
b.Property<DateTime>("ExamDate")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<string>("LabTeacher")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<string>("LectureTeacher")
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<bool>("MainExam")
|
|
.HasColumnType("bit");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.ToTable("Subjects");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Test", b =>
|
|
{
|
|
b.Property<long>("ID")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("bigint")
|
|
.UseIdentityColumn();
|
|
|
|
b.Property<DateTime>("Date")
|
|
.HasColumnType("datetime2");
|
|
|
|
b.Property<double>("FinalMarkPercent")
|
|
.HasColumnType("float");
|
|
|
|
b.Property<string>("Scope")
|
|
.IsRequired()
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
b.Property<long>("SubjectId")
|
|
.HasColumnType("bigint");
|
|
|
|
b.HasKey("ID");
|
|
|
|
b.HasIndex("SubjectId");
|
|
|
|
b.ToTable("Tests");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.API.Models.Comment", b =>
|
|
{
|
|
b.HasOne("StudyLib.Models.Subject", "Subject")
|
|
.WithMany("Comments")
|
|
.HasForeignKey("SubjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Subject");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.API.Models.SubjectDeleteRequest", b =>
|
|
{
|
|
b.HasOne("StudyLib.Models.Subject", "Subject")
|
|
.WithMany()
|
|
.HasForeignKey("SubjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Subject");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Assignment", b =>
|
|
{
|
|
b.HasOne("StudyLib.Models.Subject", "Subject")
|
|
.WithMany("Assignments")
|
|
.HasForeignKey("SubjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Subject");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Test", b =>
|
|
{
|
|
b.HasOne("StudyLib.Models.Subject", "Subject")
|
|
.WithMany("Tests")
|
|
.HasForeignKey("SubjectId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Subject");
|
|
});
|
|
|
|
modelBuilder.Entity("StudyLib.Models.Subject", b =>
|
|
{
|
|
b.Navigation("Assignments");
|
|
|
|
b.Navigation("Comments");
|
|
|
|
b.Navigation("Tests");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|