176 lines
5.7 KiB
C#
176 lines
5.7 KiB
C#
|
// <auto-generated />
|
|||
|
using System;
|
|||
|
using Microsoft.EntityFrameworkCore;
|
|||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|||
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||
|
using StudyLib.API.Data;
|
|||
|
|
|||
|
namespace StudyLib.Migrations
|
|||
|
{
|
|||
|
[DbContext(typeof(StudyLibContext))]
|
|||
|
[Migration("20201211232655_TestsChange")]
|
|||
|
partial class TestsChange
|
|||
|
{
|
|||
|
protected override void BuildTargetModel(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.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.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
|
|||
|
}
|
|||
|
}
|
|||
|
}
|