1082 lines
40 KiB
C#
1082 lines
40 KiB
C#
// <auto-generated />
|
|
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
using TechHelper.Context;
|
|
|
|
#nullable disable
|
|
|
|
namespace TechHelper.Server.Migrations
|
|
{
|
|
[DbContext(typeof(ApplicationContext))]
|
|
partial class ApplicationContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder
|
|
.HasAnnotation("ProductVersion", "8.0.16")
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 64);
|
|
|
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Assignment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("created_by");
|
|
|
|
b.Property<string>("Description")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<DateTime>("DueDate")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("due_date");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("tinyint(1)")
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<string>("SubjectArea")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("subject_area");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("varchar(255)")
|
|
.HasColumnName("title");
|
|
|
|
b.Property<float?>("TotalPoints")
|
|
.HasColumnType("float")
|
|
.HasColumnName("total_points");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.Property<Guid?>("UserId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CreatedBy");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("assignments", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentAttachment", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AssignmentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("assignment_id");
|
|
|
|
b.Property<string>("FileName")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("varchar(255)")
|
|
.HasColumnName("file_name");
|
|
|
|
b.Property<string>("FilePath")
|
|
.IsRequired()
|
|
.HasMaxLength(255)
|
|
.HasColumnType("varchar(255)")
|
|
.HasColumnName("file_path");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("tinyint(1)")
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<DateTime>("UploadedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("uploaded_at");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignmentId");
|
|
|
|
b.ToTable("assignment_attachments");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentClass", b =>
|
|
{
|
|
b.Property<Guid>("AssignmentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("assignment_id")
|
|
.HasColumnOrder(0);
|
|
|
|
b.Property<Guid>("ClassId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("class_id")
|
|
.HasColumnOrder(1);
|
|
|
|
b.Property<DateTime>("AssignedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("assigned_at");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.HasKey("AssignmentId", "ClassId");
|
|
|
|
b.HasIndex("ClassId");
|
|
|
|
b.ToTable("assignment_class", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentGroup", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AssignmentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("assignment");
|
|
|
|
b.Property<string>("Descript")
|
|
.IsRequired()
|
|
.HasMaxLength(65535)
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("descript");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<byte>("Number")
|
|
.HasColumnType("tinyint unsigned")
|
|
.HasColumnName("number");
|
|
|
|
b.Property<Guid?>("ParentGroup")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("sub_group");
|
|
|
|
b.Property<string>("Title")
|
|
.IsRequired()
|
|
.HasMaxLength(65535)
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("title");
|
|
|
|
b.Property<decimal?>("TotalPoints")
|
|
.HasColumnType("decimal(65,30)")
|
|
.HasColumnName("total_points");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignmentId");
|
|
|
|
b.HasIndex("ParentGroup");
|
|
|
|
b.ToTable("assignment_group", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentQuestion", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AssignmentGroupId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("detail_id");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("created_at");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<Guid>("QuestionId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("question_id");
|
|
|
|
b.Property<byte>("QuestionNumber")
|
|
.HasColumnType("tinyint unsigned")
|
|
.HasColumnName("question_number");
|
|
|
|
b.Property<float?>("Score")
|
|
.HasColumnType("float")
|
|
.HasColumnName("score");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignmentGroupId");
|
|
|
|
b.HasIndex("QuestionId");
|
|
|
|
b.ToTable("assignment_questions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Class", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("created_at");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<DateTime>("CreatedAt"));
|
|
|
|
b.Property<string>("Description")
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("description");
|
|
|
|
b.Property<byte>("Grade")
|
|
.HasColumnType("tinyint unsigned")
|
|
.HasColumnName("grade");
|
|
|
|
b.Property<Guid?>("HeadTeacherId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("head_teacher_id");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<byte>("Number")
|
|
.HasColumnType("tinyint unsigned")
|
|
.HasColumnName("class");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("updated_at");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlComputedColumn(b.Property<DateTime>("UpdatedAt"));
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("HeadTeacherId");
|
|
|
|
b.ToTable("classes", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.ClassStudent", b =>
|
|
{
|
|
b.Property<Guid>("ClassId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("class_id")
|
|
.HasColumnOrder(0);
|
|
|
|
b.Property<Guid>("StudentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("student_id")
|
|
.HasColumnOrder(1);
|
|
|
|
b.Property<DateTime>("EnrollmentDate")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("enrollment_date");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.HasKey("ClassId", "StudentId");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("class_student", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.ClassTeacher", b =>
|
|
{
|
|
b.Property<Guid>("ClassId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("class_id");
|
|
|
|
b.Property<Guid>("TeacherId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("teacher_id");
|
|
|
|
b.Property<string>("SubjectTaught")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("subject_taught");
|
|
|
|
b.HasKey("ClassId", "TeacherId");
|
|
|
|
b.HasIndex("TeacherId");
|
|
|
|
b.ToTable("class_teachers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Question", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<string>("CorrectAnswer")
|
|
.IsRequired()
|
|
.HasMaxLength(65535)
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("correct_answer");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("created_at");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<DateTime>("CreatedAt"));
|
|
|
|
b.Property<Guid>("CreatedBy")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("created_by");
|
|
|
|
b.Property<string>("DifficultyLevel")
|
|
.IsRequired()
|
|
.HasMaxLength(10)
|
|
.HasColumnType("varchar(10)")
|
|
.HasColumnName("difficulty_level");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<string>("QuestionText")
|
|
.IsRequired()
|
|
.HasMaxLength(65535)
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("question_text");
|
|
|
|
b.Property<string>("QuestionType")
|
|
.IsRequired()
|
|
.HasMaxLength(20)
|
|
.HasColumnType("varchar(20)")
|
|
.HasColumnName("question_type");
|
|
|
|
b.Property<string>("SubjectArea")
|
|
.IsRequired()
|
|
.HasMaxLength(100)
|
|
.HasColumnType("varchar(100)")
|
|
.HasColumnName("subject_area");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("CreatedBy");
|
|
|
|
b.ToTable("questions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Submission", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AssignmentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("assignment_id");
|
|
|
|
b.Property<Guid>("AttemptNumber")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("attempt_number");
|
|
|
|
b.Property<DateTime?>("GradedAt")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("graded_at");
|
|
|
|
b.Property<Guid?>("GradedBy")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("graded_by");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<string>("OverallFeedback")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("overall_feedback");
|
|
|
|
b.Property<float?>("OverallGrade")
|
|
.HasPrecision(5, 2)
|
|
.HasColumnType("float")
|
|
.HasColumnName("overall_grade");
|
|
|
|
b.Property<string>("Status")
|
|
.IsRequired()
|
|
.HasMaxLength(15)
|
|
.HasColumnType("varchar(15)")
|
|
.HasColumnName("status");
|
|
|
|
b.Property<Guid>("StudentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("student_id");
|
|
|
|
b.Property<DateTime>("SubmissionTime")
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("submission_time");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignmentId");
|
|
|
|
b.HasIndex("GradedBy");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.ToTable("submissions", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.SubmissionDetail", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("id");
|
|
|
|
b.Property<Guid>("AssignmentQuestionId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("assignment_question_id");
|
|
|
|
b.Property<DateTime>("CreatedAt")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("created_at");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<DateTime>("CreatedAt"));
|
|
|
|
b.Property<bool?>("IsCorrect")
|
|
.HasColumnType("tinyint(1)")
|
|
.HasColumnName("is_correct");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("tinyint(1)")
|
|
.HasDefaultValue(false)
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<float?>("PointsAwarded")
|
|
.HasPrecision(5, 2)
|
|
.HasColumnType("float")
|
|
.HasColumnName("points_awarded");
|
|
|
|
b.Property<string>("StudentAnswer")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("student_answer");
|
|
|
|
b.Property<Guid>("StudentId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("student_id");
|
|
|
|
b.Property<Guid>("SubmissionId")
|
|
.HasColumnType("char(36)")
|
|
.HasColumnName("submission_id");
|
|
|
|
b.Property<string>("TeacherFeedback")
|
|
.IsRequired()
|
|
.HasColumnType("longtext")
|
|
.HasColumnName("teacher_feedback");
|
|
|
|
b.Property<DateTime>("UpdatedAt")
|
|
.IsConcurrencyToken()
|
|
.ValueGeneratedOnAddOrUpdate()
|
|
.HasColumnType("datetime(6)")
|
|
.HasColumnName("updated_at");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("AssignmentQuestionId");
|
|
|
|
b.HasIndex("StudentId");
|
|
|
|
b.HasIndex("SubmissionId");
|
|
|
|
b.ToTable("submission_details", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.User", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)");
|
|
|
|
b.Property<int>("AccessFailedCount")
|
|
.HasColumnType("int");
|
|
|
|
b.Property<string>("Address")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("DisplayName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Email")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<bool>("EmailConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<bool>("IsDeleted")
|
|
.HasColumnType("tinyint(1)")
|
|
.HasColumnName("deleted");
|
|
|
|
b.Property<bool>("LockoutEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("NormalizedEmail")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("NormalizedUserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("PasswordHash")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("PhoneNumber")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("PhoneNumberConfirmed")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("RefreshToken")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<DateTime?>("RefreshTokenExpiryTime")
|
|
.HasColumnType("datetime(6)");
|
|
|
|
b.Property<string>("SecurityStamp")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<bool>("TwoFactorEnabled")
|
|
.HasColumnType("tinyint(1)");
|
|
|
|
b.Property<string>("UserName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedEmail")
|
|
.HasDatabaseName("EmailIndex");
|
|
|
|
b.HasIndex("NormalizedUserName")
|
|
.IsUnique()
|
|
.HasDatabaseName("UserNameIndex");
|
|
|
|
b.ToTable("AspNetUsers", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("char(36)");
|
|
|
|
b.Property<string>("ConcurrencyStamp")
|
|
.IsConcurrencyToken()
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("Name")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.Property<string>("NormalizedName")
|
|
.HasMaxLength(256)
|
|
.HasColumnType("varchar(256)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("NormalizedName")
|
|
.IsUnique()
|
|
.HasDatabaseName("RoleNameIndex");
|
|
|
|
b.ToTable("AspNetRoles", (string)null);
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
Id = new Guid("ea0c88d8-1a52-4034-bb37-5a95043821eb"),
|
|
Name = "Student",
|
|
NormalizedName = "STUDENT"
|
|
},
|
|
new
|
|
{
|
|
Id = new Guid("9de22e41-c096-4d5a-b55a-ce0122aa3ada"),
|
|
Name = "Teacher",
|
|
NormalizedName = "TEACHER"
|
|
},
|
|
new
|
|
{
|
|
Id = new Guid("dee718d9-b731-485f-96bb-a59ce777870f"),
|
|
Name = "Administrator",
|
|
NormalizedName = "ADMINISTRATOR"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetRoleClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("int");
|
|
|
|
MySqlPropertyBuilderExtensions.UseMySqlIdentityColumn(b.Property<int>("Id"));
|
|
|
|
b.Property<string>("ClaimType")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<string>("ClaimValue")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserClaims", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("ProviderKey")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("ProviderDisplayName")
|
|
.HasColumnType("longtext");
|
|
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.HasKey("LoginProvider", "ProviderKey");
|
|
|
|
b.HasIndex("UserId");
|
|
|
|
b.ToTable("AspNetUserLogins", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.Property<Guid>("RoleId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.HasKey("UserId", "RoleId");
|
|
|
|
b.HasIndex("RoleId");
|
|
|
|
b.ToTable("AspNetUserRoles", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.Property<Guid>("UserId")
|
|
.HasColumnType("char(36)");
|
|
|
|
b.Property<string>("LoginProvider")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("Name")
|
|
.HasColumnType("varchar(255)");
|
|
|
|
b.Property<string>("Value")
|
|
.HasColumnType("longtext");
|
|
|
|
b.HasKey("UserId", "LoginProvider", "Name");
|
|
|
|
b.ToTable("AspNetUserTokens", (string)null);
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Assignment", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", "Creator")
|
|
.WithMany()
|
|
.HasForeignKey("CreatedBy")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", null)
|
|
.WithMany("CreatedAssignments")
|
|
.HasForeignKey("UserId");
|
|
|
|
b.Navigation("Creator");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentAttachment", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Assignment", "Assignment")
|
|
.WithMany("AssignmentAttachments")
|
|
.HasForeignKey("AssignmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Assignment");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentClass", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Assignment", "Assignment")
|
|
.WithMany("AssignmentClasses")
|
|
.HasForeignKey("AssignmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.Class", "Class")
|
|
.WithMany("AssignmentClasses")
|
|
.HasForeignKey("ClassId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Assignment");
|
|
|
|
b.Navigation("Class");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentGroup", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Assignment", "Assignment")
|
|
.WithMany("AssignmentGroups")
|
|
.HasForeignKey("AssignmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.AssignmentGroup", "ParentAssignmentGroup")
|
|
.WithMany("ChildAssignmentGroups")
|
|
.HasForeignKey("ParentGroup")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.Navigation("Assignment");
|
|
|
|
b.Navigation("ParentAssignmentGroup");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentQuestion", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.AssignmentGroup", "AssignmentGroup")
|
|
.WithMany("AssignmentQuestions")
|
|
.HasForeignKey("AssignmentGroupId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.Question", "Question")
|
|
.WithMany("AssignmentQuestions")
|
|
.HasForeignKey("QuestionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("AssignmentGroup");
|
|
|
|
b.Navigation("Question");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Class", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", "HeadTeacher")
|
|
.WithMany()
|
|
.HasForeignKey("HeadTeacherId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("HeadTeacher");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.ClassStudent", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Class", "Class")
|
|
.WithMany("ClassStudents")
|
|
.HasForeignKey("ClassId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", "Student")
|
|
.WithMany("EnrolledClassesLink")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Class");
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.ClassTeacher", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Class", "Class")
|
|
.WithMany("ClassTeachers")
|
|
.HasForeignKey("ClassId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", "Teacher")
|
|
.WithMany("TaughtClassesLink")
|
|
.HasForeignKey("TeacherId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Class");
|
|
|
|
b.Navigation("Teacher");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Question", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", "Creator")
|
|
.WithMany("CreatedQuestions")
|
|
.HasForeignKey("CreatedBy")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Creator");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Submission", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.Assignment", "Assignment")
|
|
.WithMany("Submissions")
|
|
.HasForeignKey("AssignmentId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", "Grader")
|
|
.WithMany("GradedSubmissions")
|
|
.HasForeignKey("GradedBy")
|
|
.OnDelete(DeleteBehavior.SetNull);
|
|
|
|
b.HasOne("Entities.Contracts.User", "Student")
|
|
.WithMany("SubmissionsAsStudent")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Assignment");
|
|
|
|
b.Navigation("Grader");
|
|
|
|
b.Navigation("Student");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.SubmissionDetail", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.AssignmentQuestion", "AssignmentQuestion")
|
|
.WithMany("SubmissionDetails")
|
|
.HasForeignKey("AssignmentQuestionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", "User")
|
|
.WithMany("SubmissionDetails")
|
|
.HasForeignKey("StudentId")
|
|
.OnDelete(DeleteBehavior.Restrict)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.Submission", "Submission")
|
|
.WithMany("SubmissionDetails")
|
|
.HasForeignKey("SubmissionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("AssignmentQuestion");
|
|
|
|
b.Navigation("Submission");
|
|
|
|
b.Navigation("User");
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>", null)
|
|
.WithMany()
|
|
.HasForeignKey("RoleId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.Contracts.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<System.Guid>", b =>
|
|
{
|
|
b.HasOne("Entities.Contracts.User", null)
|
|
.WithMany()
|
|
.HasForeignKey("UserId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Assignment", b =>
|
|
{
|
|
b.Navigation("AssignmentAttachments");
|
|
|
|
b.Navigation("AssignmentClasses");
|
|
|
|
b.Navigation("AssignmentGroups");
|
|
|
|
b.Navigation("Submissions");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentGroup", b =>
|
|
{
|
|
b.Navigation("AssignmentQuestions");
|
|
|
|
b.Navigation("ChildAssignmentGroups");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.AssignmentQuestion", b =>
|
|
{
|
|
b.Navigation("SubmissionDetails");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Class", b =>
|
|
{
|
|
b.Navigation("AssignmentClasses");
|
|
|
|
b.Navigation("ClassStudents");
|
|
|
|
b.Navigation("ClassTeachers");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Question", b =>
|
|
{
|
|
b.Navigation("AssignmentQuestions");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.Submission", b =>
|
|
{
|
|
b.Navigation("SubmissionDetails");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.Contracts.User", b =>
|
|
{
|
|
b.Navigation("CreatedAssignments");
|
|
|
|
b.Navigation("CreatedQuestions");
|
|
|
|
b.Navigation("EnrolledClassesLink");
|
|
|
|
b.Navigation("GradedSubmissions");
|
|
|
|
b.Navigation("SubmissionDetails");
|
|
|
|
b.Navigation("SubmissionsAsStudent");
|
|
|
|
b.Navigation("TaughtClassesLink");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|