study-lib-backend/Migrations/20201204184348_SubModelsUpdate.Designer.cs
2020-12-12 14:47:20 +01:00

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("20201204184348_SubModelsUpdate")]
partial class SubModelsUpdate
{
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("Comment");
});
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("Assignment");
});
modelBuilder.Entity("StudyLib.Models.MinorExam", 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("MinorExam");
});
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.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("Tasks")
.HasForeignKey("SubjectID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Subject");
});
modelBuilder.Entity("StudyLib.Models.MinorExam", 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("Comments");
b.Navigation("Tasks");
b.Navigation("Tests");
});
#pragma warning restore 612, 618
}
}
}