优化考试排考
This commit is contained in:
+220
@@ -1558,6 +1558,119 @@ namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql
|
||||
b.ToTable("ExamPlans");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ClassroomId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("CourseId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("EndsAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("ExamDate")
|
||||
.HasColumnType("date");
|
||||
|
||||
b.Property<Guid>("ExamPlanId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int>("PeriodCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("RequiredInvigilatorCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("StartPeriod")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("StartsAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.Property<DateTime>("UpdatedAt")
|
||||
.HasColumnType("datetime(6)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ClassroomId");
|
||||
|
||||
b.HasIndex("CourseId")
|
||||
.HasDatabaseName("IX_ExamRooms_CourseId");
|
||||
|
||||
b.HasIndex("ExamPlanId", "StartsAt")
|
||||
.HasDatabaseName("IX_ExamRooms_Plan_Time");
|
||||
|
||||
b.HasIndex("ExamPlanId", "ClassroomId", "StartsAt")
|
||||
.HasDatabaseName("IX_ExamRooms_Plan_Room_Time");
|
||||
|
||||
b.ToTable("ExamRooms", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomInvigilator", b =>
|
||||
{
|
||||
b.Property<Guid>("ExamRoomId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("TeacherId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("ExamRoomId", "TeacherId");
|
||||
|
||||
b.HasIndex("TeacherId")
|
||||
.HasDatabaseName("IX_ExamRoomInvigilators_TeacherId");
|
||||
|
||||
b.ToTable("ExamRoomInvigilators", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomSession", b =>
|
||||
{
|
||||
b.Property<Guid>("ExamRoomId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ExamSessionId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.HasKey("ExamRoomId", "ExamSessionId");
|
||||
|
||||
b.HasIndex("ExamSessionId")
|
||||
.HasDatabaseName("IX_ExamRoomSessions_SessionId");
|
||||
|
||||
b.ToTable("ExamRoomSessions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSeatAssignment", b =>
|
||||
{
|
||||
b.Property<Guid>("ExamRoomId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("StudentId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid>("ExamSessionId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<int>("SeatNumber")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ExamRoomId", "StudentId");
|
||||
|
||||
b.HasIndex("StudentId")
|
||||
.HasDatabaseName("IX_ExamSeats_StudentId");
|
||||
|
||||
b.HasIndex("ExamSessionId", "StudentId")
|
||||
.IsUnique()
|
||||
.HasDatabaseName("UX_ExamSeats_Session_Student");
|
||||
|
||||
b.ToTable("ExamSeats", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -4097,6 +4210,98 @@ namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql
|
||||
b.Navigation("AcademicTerm");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b =>
|
||||
{
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom")
|
||||
.WithMany()
|
||||
.HasForeignKey("ClassroomId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course")
|
||||
.WithMany()
|
||||
.HasForeignKey("CourseId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamPlan", "ExamPlan")
|
||||
.WithMany("Rooms")
|
||||
.HasForeignKey("ExamPlanId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Classroom");
|
||||
|
||||
b.Navigation("Course");
|
||||
|
||||
b.Navigation("ExamPlan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomInvigilator", b =>
|
||||
{
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", "ExamRoom")
|
||||
.WithMany("Invigilators")
|
||||
.HasForeignKey("ExamRoomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher")
|
||||
.WithMany()
|
||||
.HasForeignKey("TeacherId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ExamRoom");
|
||||
|
||||
b.Navigation("Teacher");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomSession", b =>
|
||||
{
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", "ExamRoom")
|
||||
.WithMany("SessionLinks")
|
||||
.HasForeignKey("ExamRoomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamSession", "ExamSession")
|
||||
.WithMany("RoomLinks")
|
||||
.HasForeignKey("ExamSessionId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ExamRoom");
|
||||
|
||||
b.Navigation("ExamSession");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSeatAssignment", b =>
|
||||
{
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", "ExamRoom")
|
||||
.WithMany("Seats")
|
||||
.HasForeignKey("ExamRoomId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.ExamSession", "ExamSession")
|
||||
.WithMany("SeatAssignments")
|
||||
.HasForeignKey("ExamSessionId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student")
|
||||
.WithMany()
|
||||
.HasForeignKey("StudentId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ExamRoom");
|
||||
|
||||
b.Navigation("ExamSession");
|
||||
|
||||
b.Navigation("Student");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b =>
|
||||
{
|
||||
b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom")
|
||||
@@ -4832,12 +5037,27 @@ namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b =>
|
||||
{
|
||||
b.Navigation("Rooms");
|
||||
|
||||
b.Navigation("Sessions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b =>
|
||||
{
|
||||
b.Navigation("Invigilators");
|
||||
|
||||
b.Navigation("Seats");
|
||||
|
||||
b.Navigation("SessionLinks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b =>
|
||||
{
|
||||
b.Navigation("Invigilators");
|
||||
|
||||
b.Navigation("RoomLinks");
|
||||
|
||||
b.Navigation("SeatAssignments");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b =>
|
||||
|
||||
Reference in New Issue
Block a user