diff --git a/src/Jiaowu.Api/Controllers/StudentLeavesController.cs b/src/Jiaowu.Api/Controllers/StudentLeavesController.cs new file mode 100644 index 0000000..96b30d1 --- /dev/null +++ b/src/Jiaowu.Api/Controllers/StudentLeavesController.cs @@ -0,0 +1,86 @@ +using System.ComponentModel.DataAnnotations; +using Jiaowu.Api.Domain.Academic; +using Jiaowu.Api.Domain.Identity; +using Jiaowu.Api.Infrastructure.Auth; +using Jiaowu.Api.Infrastructure.Persistence; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; + +namespace Jiaowu.Api.Controllers; + +[ApiController] +[Authorize] +[Route("api/student-leaves")] +public sealed class StudentLeavesController(AppDbContext db, ICurrentUserDataScope scope) : ControllerBase +{ + private const string Managers = SystemRoles.SuperAdmin + "," + SystemRoles.AcademicAdmin + "," + SystemRoles.CollegeAdmin; + + [HttpGet("mine")] + [Authorize(Roles = SystemRoles.Student)] + public async Task Mine(CancellationToken ct) => Ok(await db.StudentLeaves.AsNoTracking() + .Where(x => x.Student!.UserId == scope.Current.UserId) + .OrderByDescending(x => x.CreatedAt).Take(200) + .Select(x => new { x.Id, x.Type, x.StartAt, x.EndAt, x.Reason, x.Status, x.CreatedAt, x.ReviewedAt, x.ReviewComment }) + .ToListAsync(ct)); + + [HttpPost] + [Authorize(Roles = SystemRoles.Student)] + public async Task Create(CreateStudentLeaveRequest request, CancellationToken ct) + { + if (!Enum.IsDefined(request.Type) || request.StartAt == default || request.EndAt == default || request.EndAt <= request.StartAt || string.IsNullOrWhiteSpace(request.Reason)) + return BadRequest(new { message = "请填写有效的请假类型、起止时间和事由。" }); + var studentId = await db.Students.Where(x => x.UserId == scope.Current.UserId).Select(x => (Guid?)x.Id).FirstOrDefaultAsync(ct); + if (studentId is null) return Forbid(); + var leave = new StudentLeave { StudentId = studentId.Value, Type = request.Type, StartAt = request.StartAt.UtcDateTime, + EndAt = request.EndAt.UtcDateTime, Reason = request.Reason.Trim() }; + db.StudentLeaves.Add(leave); + await db.SaveChangesAsync(ct); + return Ok(new { leave.Id }); + } + + [HttpGet("pending")] + [Authorize(Roles = Managers)] + public async Task Pending(CancellationToken ct) => Ok(await Scoped() + .Where(x => x.Status == StudentLeaveStatus.Submitted) + .OrderBy(x => x.CreatedAt).Take(200) + .Select(x => new { x.Id, StudentName = x.Student!.Name, x.Student.StudentNumber, x.Type, x.StartAt, x.EndAt, x.Reason, x.CreatedAt }) + .ToListAsync(ct)); + + [HttpPost("{id:guid}/review")] + [Authorize(Roles = Managers)] + public async Task Review(Guid id, ReviewStudentLeaveRequest request, CancellationToken ct) + { + if (!request.Approved && string.IsNullOrWhiteSpace(request.Comment)) + return BadRequest(new { message = "驳回时请填写审核意见。" }); + var now = DateTime.UtcNow; + var status = request.Approved ? StudentLeaveStatus.Approved : StudentLeaveStatus.Rejected; + var comment = request.Comment?.Trim(); + var updated = await Scoped().Where(x => x.Id == id && x.Status == StudentLeaveStatus.Submitted) + .ExecuteUpdateAsync(s => s.SetProperty(x => x.Status, status).SetProperty(x => x.ReviewComment, comment) + .SetProperty(x => x.ReviewedAt, now).SetProperty(x => x.ReviewedByUserId, scope.Current.UserId) + .SetProperty(x => x.UpdatedAt, now), ct); + return updated == 1 ? NoContent() : Conflict(new { message = "申请不存在、无权审核或已处理。" }); + } + + [HttpPost("{id:guid}/withdraw")] + [Authorize(Roles = SystemRoles.Student)] + public async Task Withdraw(Guid id, CancellationToken ct) + { + var now = DateTime.UtcNow; + var updated = await db.StudentLeaves.Where(x => x.Id == id && x.Student!.UserId == scope.Current.UserId && x.Status == StudentLeaveStatus.Submitted) + .ExecuteUpdateAsync(s => s.SetProperty(x => x.Status, StudentLeaveStatus.Withdrawn).SetProperty(x => x.UpdatedAt, now), ct); + return updated == 1 ? NoContent() : Conflict(new { message = "申请不存在或已处理。" }); + } + + private IQueryable Scoped() + { + var query = db.StudentLeaves.AsNoTracking(); + if (scope.Current.Scope == DataScope.All) return query; + var collegeId = scope.Current.RestrictedCollegeId; + return collegeId.HasValue ? query.Where(x => x.Student!.AdministrativeClass!.Major!.CollegeId == collegeId) : query.Where(x => false); + } +} + +public sealed record CreateStudentLeaveRequest(StudentLeaveType Type, DateTimeOffset StartAt, DateTimeOffset EndAt, [Required, MaxLength(500)] string Reason); +public sealed record ReviewStudentLeaveRequest(bool Approved, [MaxLength(500)] string? Comment); diff --git a/src/Jiaowu.Api/Domain/Academic/ApprovalEntities.cs b/src/Jiaowu.Api/Domain/Academic/ApprovalEntities.cs index ac9dbfe..09d04b6 100644 --- a/src/Jiaowu.Api/Domain/Academic/ApprovalEntities.cs +++ b/src/Jiaowu.Api/Domain/Academic/ApprovalEntities.cs @@ -2,6 +2,23 @@ using Jiaowu.Api.Domain.Common; namespace Jiaowu.Api.Domain.Academic; +public sealed class StudentLeave : EntityBase +{ + public Guid StudentId { get; set; } + public Student? Student { get; set; } + public StudentLeaveType Type { get; set; } + public DateTime StartAt { get; set; } + public DateTime EndAt { get; set; } + public required string Reason { get; set; } + public StudentLeaveStatus Status { get; set; } = StudentLeaveStatus.Submitted; + public string? ReviewComment { get; set; } + public Guid? ReviewedByUserId { get; set; } + public DateTime? ReviewedAt { get; set; } +} + +public enum StudentLeaveType { Sick = 1, Personal = 2, Official = 3, Bereavement = 4, Other = 5 } +public enum StudentLeaveStatus { Submitted = 1, Approved = 2, Rejected = 3, Withdrawn = 4 } + // ═══════════════ 免修 ═══════════════ public sealed class CourseExemption : EntityBase { diff --git a/src/Jiaowu.Api/Infrastructure/Persistence/AppDbContext.cs b/src/Jiaowu.Api/Infrastructure/Persistence/AppDbContext.cs index 506430f..8e71058 100644 --- a/src/Jiaowu.Api/Infrastructure/Persistence/AppDbContext.cs +++ b/src/Jiaowu.Api/Infrastructure/Persistence/AppDbContext.cs @@ -178,6 +178,7 @@ public sealed class AppDbContext(DbContextOptions options) public DbSet DeferredExams => Set(); public DbSet GradeModifications => Set(); public DbSet CourseSubstitutions => Set(); + public DbSet StudentLeaves => Set(); public DbSet GradeAppeals => Set(); public DbSet TeachingMonitoringSettings => Set(); @@ -2216,6 +2217,15 @@ public sealed class AppDbContext(DbContextOptions options) .HasForeignKey(x => x.EvaluationDimensionId).OnDelete(DeleteBehavior.Restrict); }); + builder.Entity(entity => + { + entity.Property(x => x.Reason).HasMaxLength(500).IsRequired(); + entity.Property(x => x.ReviewComment).HasMaxLength(500); + entity.HasIndex(x => new { x.StudentId, x.CreatedAt }); + entity.HasIndex(x => new { x.Status, x.CreatedAt }); + entity.HasOne(x => x.Student).WithMany().HasForeignKey(x => x.StudentId).OnDelete(DeleteBehavior.Restrict); + }); + builder.Entity(entity => { entity.Property(x => x.ReviewerRoleSnapshot).HasMaxLength(32); diff --git a/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.Designer.cs b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.Designer.cs new file mode 100644 index 0000000..2d96cfc --- /dev/null +++ b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.Designer.cs @@ -0,0 +1,12344 @@ +// +using System; +using Jiaowu.Api.Infrastructure.Persistence; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql; + +[DbContext(typeof(AppDbContext))] +[Migration("20261114070002_StudentLeave")] +partial class _20261114070002_StudentLeave +{ + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "11.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AudienceRoles") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("EndsOn") + .HasColumnType("date"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("IsOffDay") + .HasColumnType("tinyint(1)"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("ReminderDays") + .HasColumnType("int"); + + b.Property("Source") + .HasColumnType("int"); + + b.Property("SourceYear") + .HasColumnType("int"); + + b.Property("StartsOn") + .HasColumnType("date"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "StartsOn"); + + b.HasIndex("IsEnabled", "StartsOn"); + + b.HasIndex("AcademicTermId", "Source", "SourceYear", "StartsOn"); + + b.ToTable("AcademicCalendarEvents"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AssignedCounselorUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("FollowUpDueDate") + .HasColumnType("date"); + + b.Property("ReviewDate") + .HasColumnType("date"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TaskCompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WarningRecordId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WarningRecordId") + .IsUnique(); + + b.HasIndex("StudentId", "Status"); + + b.HasIndex("AssignedCounselorUserId", "Status", "FollowUpDueDate"); + + b.ToTable("AcademicRiskCases"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicRiskCaseId") + .HasColumnType("char(36)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); + + b.Property("RecordedByUserId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("RecordedByUserId"); + + b.HasIndex("AcademicRiskCaseId", "OccurredAt"); + + b.ToTable("AcademicRiskCaseEntries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicTerm", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicYear") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); + + b.Property("IsCurrent") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Season") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("StartDate") + .HasColumnType("date"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsArchived"); + + b.HasIndex("IsCurrent"); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("AcademicTerms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CounselorName") + .HasColumnType("longtext"); + + b.Property("CounselorUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MajorId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("CounselorUserId"); + + b.HasIndex("MajorId"); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("AdministrativeClasses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ApprovalRouteSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewerRole") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Type") + .IsUnique(); + + b.ToTable("ApprovalRouteSettings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ArchiveEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActorName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("ActorUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EntityId") + .HasColumnType("char(36)"); + + b.Property("IsArchived") + .HasColumnType("tinyint(1)"); + + b.Property("Kind") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Kind", "EntityId", "CreatedAt"); + + b.ToTable("ArchiveEvents"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccuracyMeters") + .HasColumnType("double"); + + b.Property("AttendanceSheetId") + .HasColumnType("char(36)"); + + b.Property("CheckInMethod") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DeviceIdentifierHash") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("DevicePlatform") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("DistanceMeters") + .HasColumnType("double"); + + b.Property("FailureCode") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("IsSuccessful") + .HasColumnType("tinyint(1)"); + + b.Property("Latitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("Longitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("RiskFlags") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("DeviceIdentifierHash", "CreatedAt"); + + b.HasIndex("IpAddress", "CreatedAt"); + + b.HasIndex("AttendanceSheetId", "StudentId", "CreatedAt"); + + b.ToTable("AttendanceCheckInAttempts"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => + { + b.Property("AttendanceSheetId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("AppealReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("AppealReviewComment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("AppealReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("AppealStatus") + .HasColumnType("int"); + + b.Property("AppealSubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("CheckInAccuracyMeters") + .HasColumnType("double"); + + b.Property("CheckInAt") + .HasColumnType("datetime(6)"); + + b.Property("CheckInDistanceMeters") + .HasColumnType("double"); + + b.Property("CheckInLatitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("CheckInLongitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("CheckedInMethod") + .HasColumnType("int"); + + b.Property("Notes") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("Status") + .HasColumnType("int"); + + b.HasKey("AttendanceSheetId", "StudentId"); + + b.HasIndex("AppealStatus"); + + b.HasIndex("StudentId"); + + b.ToTable("AttendanceRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AttendanceDate") + .HasColumnType("datetime(6)"); + + b.Property("CheckInEndsAt") + .HasColumnType("datetime(6)"); + + b.Property("CheckInMethod") + .HasColumnType("int"); + + b.Property("CheckInStartsAt") + .HasColumnType("datetime(6)"); + + b.Property("CheckInToken") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("LocationRadiusMeters") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TargetLatitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("TargetLongitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CheckInToken") + .IsUnique(); + + b.HasIndex("TeachingTaskId", "AttendanceDate"); + + b.ToTable("AttendanceSheets"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActiveSchedulePlanId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CompletedTasks") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedEntries") + .HasColumnType("int"); + + b.Property("CurrentGeneration") + .HasColumnType("int"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("MessagesJson") + .HasColumnType("longtext"); + + b.Property("ProcessedTasks") + .HasColumnType("int"); + + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); + + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TotalGenerations") + .HasColumnType("int"); + + b.Property("TotalTasks") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ActiveSchedulePlanId") + .IsUnique(); + + b.HasIndex("RequestedByUserId"); + + b.HasIndex("SchedulePlanId", "CreatedAt"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("AutomaticScheduleJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CampusId") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CampusId"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Buildings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Campus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Address") + .HasColumnType("longtext"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Campuses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("ApplicationId") + .HasColumnType("char(36)"); + + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); + + b.Property("ConfirmedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("OrderNumber") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("PaymentMethod") + .HasColumnType("int"); + + b.Property("ReferenceNumber") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicationId") + .IsUnique(); + + b.HasIndex("ConfirmedByUserId"); + + b.HasIndex("OrderNumber") + .IsUnique(); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("CampusPaymentOrders"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicantNote") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); + + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ProjectId") + .HasColumnType("char(36)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ReviewedByUserId"); + + b.HasIndex("StudentId"); + + b.HasIndex("ProjectId", "StudentId") + .IsUnique(); + + b.HasIndex("ProjectId", "Status", "CreatedAt"); + + b.ToTable("CampusRegistrationApplications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("ContactName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ContactPhone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("FeeAmount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("RegistrationEndsAt") + .HasColumnType("datetime(6)"); + + b.Property("RegistrationStartsAt") + .HasColumnType("datetime(6)"); + + b.Property("RequiresReview") + .HasColumnType("tinyint(1)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("CreatedByUserId"); + + b.HasIndex("CollegeId", "Status", "RegistrationEndsAt"); + + b.ToTable("CampusRegistrationProjects"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Balance") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId") + .IsUnique(); + + b.ToTable("CampusWalletAccounts"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("BalanceAfter") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("OperatedByUserId") + .HasColumnType("char(36)"); + + b.Property("PaymentOrderId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WalletAccountId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("OperatedByUserId"); + + b.HasIndex("PaymentOrderId") + .IsUnique(); + + b.HasIndex("WalletAccountId", "CreatedAt"); + + b.ToTable("CampusWalletTransactions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AvailabilityStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("BuildingId") + .HasColumnType("char(36)"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Equipment") + .HasColumnType("longtext"); + + b.Property("Floor") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("RoomType") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("TeachingVenueNature") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("BuildingId"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Classrooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsAvailable") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ClassroomId", "IsAvailable"); + + b.ToTable("ClassroomEquipment"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AssignedAt") + .HasColumnType("datetime(6)"); + + b.Property("AssignedByUserId") + .HasColumnType("char(36)"); + + b.Property("AssignedToUserId") + .HasColumnType("char(36)"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ClassroomEquipmentId") + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("EscalationTeacherNotifiedAt") + .HasColumnType("datetime(6)"); + + b.Property("FaultItem") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); + + b.Property("InitialTeacherNotifiedAt") + .HasColumnType("datetime(6)"); + + b.Property("RepairResult") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("ReporterContact") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ReporterName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ReporterUserId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AssignedByUserId"); + + b.HasIndex("AssignedToUserId"); + + b.HasIndex("ClassroomEquipmentId"); + + b.HasIndex("ReporterUserId"); + + b.HasIndex("ClassroomId", "Status"); + + b.HasIndex("Status", "EscalationTeacherNotifiedAt"); + + b.ToTable("ClassroomRepairTickets"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("ApplicantCollegeId") + .HasColumnType("char(36)"); + + b.Property("ApplicantName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); + + b.Property("AttendeeCount") + .HasColumnType("int"); + + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("Purpose") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ReservationDate") + .HasColumnType("date"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId"); + + b.HasIndex("ReviewedByUserId"); + + b.HasIndex("ApplicantCollegeId", "Status", "ReservationDate"); + + b.HasIndex("ApplicantUserId", "Status", "CreatedAt"); + + b.HasIndex("ClassroomId", "ReservationDate", "Status", "StartPeriod"); + + b.ToTable("ClassroomReservations"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CampusId") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ShortName") + .HasColumnType("longtext"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CampusId"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Colleges"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentResultDetailId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentResultDetailId"); + + b.HasIndex("StudentId"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); + + b.ToTable("ComprehensiveAssessmentAppeals"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AcademicYear") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("CalculationStatus") + .HasColumnType("int"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("LiveCalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("LiveCalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("LiveCalculationStatus") + .HasColumnType("int"); + + b.Property("LiveEstimationEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("PendingCalculationMode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(2); + + b.Property("PlanPublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("PublicationCount") + .HasColumnType("int"); + + b.Property("PublicityEndsAt") + .HasColumnType("datetime(6)"); + + b.Property("PublicityStartsAt") + .HasColumnType("datetime(6)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId"); + + b.HasIndex("CollegeId"); + + b.HasIndex("ComprehensiveAssessmentSchemeId"); + + b.HasIndex("CreatedByUserId"); + + b.HasIndex("AcademicYear", "CollegeId", "Status", "CreatedAt"); + + b.HasIndex("LiveEstimationEnabled", "Status", "LiveCalculationStatus", "LiveCalculatedAt"); + + b.ToTable("ComprehensiveAssessmentBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApprovedScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ClaimedScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("CollegeComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CollegeReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("CollegeReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentRuleId") + .HasColumnType("char(36)"); + + b.Property("CounselorComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CounselorReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("CounselorReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EvidenceDescription") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("EvidenceUrl") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Level") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("OccurredOn") + .HasColumnType("date"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentDimensionId"); + + b.HasIndex("ComprehensiveAssessmentRuleId"); + + b.HasIndex("StudentId", "OccurredOn"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); + + b.ToTable("ComprehensiveAssessmentDeclarations"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsRequired") + .HasColumnType("tinyint(1)"); + + b.Property("MaxScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SettingsJson") + .HasColumnType("text"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("SourceType") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Weight") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentSchemeId", "Code") + .IsUnique(); + + b.ToTable("ComprehensiveAssessmentDimensions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DataCutoffAt") + .HasColumnType("datetime(6)"); + + b.Property("ExemptCount") + .HasColumnType("int"); + + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("LockedAt") + .HasColumnType("datetime(6)"); + + b.Property("LockedByUserId") + .HasColumnType("char(36)"); + + b.Property("MissingCount") + .HasColumnType("int"); + + b.Property("PlannedLockAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentCount") + .HasColumnType("int"); + + b.Property("UnlockReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentDimensionId"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); + + b.HasIndex("Status", "PlannedLockAt"); + + b.ToTable("ComprehensiveAssessmentDimensionLocks"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentDimensionLockId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("RawScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); + + b.Property("SourceStatus") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("ComprehensiveAssessmentDimensionLockId", "StudentId", "Version") + .IsUnique(); + + b.ToTable("ComprehensiveAssessmentDimensionSnapshots"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EstimatedTotalScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("MissingRequiredDimensionCount") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") + .IsUnique(); + + b.ToTable("ComprehensiveAssessmentLiveResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentLiveResultId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("IsLocked") + .HasColumnType("tinyint(1)"); + + b.Property("LockVersion") + .HasColumnType("int"); + + b.Property("RawScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); + + b.Property("SourceStatus") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeightedScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentDimensionId"); + + b.HasIndex("ComprehensiveAssessmentLiveResultId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); + + b.ToTable("ComprehensiveAssessmentLiveResultDetails"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("PublishedByUserId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("PublishedByUserId"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "Version") + .IsUnique(); + + b.ToTable("ComprehensiveAssessmentPublications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ClassRank") + .HasColumnType("int"); + + b.Property("CollegeRank") + .HasColumnType("int"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("MajorRank") + .HasColumnType("int"); + + b.Property("MissingRequiredDimensionCount") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TotalScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "ClassRank"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentResults_ComprehensiveAssessmentBatch~1"); + + b.ToTable("ComprehensiveAssessmentResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentResultId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("RawScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); + + b.Property("SourceStatus") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeightedScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentDimensionId"); + + b.HasIndex("ComprehensiveAssessmentResultId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); + + b.ToTable("ComprehensiveAssessmentResultDetails"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CategoryCap") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Level") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Score") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentDimensionId"); + + b.HasIndex("ComprehensiveAssessmentSchemeId", "ComprehensiveAssessmentDimensionId", "Category", "Level") + .IsUnique(); + + b.ToTable("ComprehensiveAssessmentRules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CompletedByUserId") + .HasColumnType("char(36)"); + + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExecutionMode") + .HasColumnType("int"); + + b.Property("NodeType") + .HasColumnType("int"); + + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ScheduledAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ComprehensiveAssessmentBatchId", "NodeType") + .IsUnique(); + + b.HasIndex("Status", "ScheduledAt"); + + b.ToTable("ComprehensiveAssessmentScheduleNodes"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("PublicityDays") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("RankingScope") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CreatedByUserId"); + + b.HasIndex("CollegeId", "Status", "CreatedAt"); + + b.ToTable("ComprehensiveAssessmentSchemes"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("AssessmentMethod") + .HasColumnType("int"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("CourseCategoryId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Credits") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("EnglishName") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("GradeEvaluationMethod") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LectureHours") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Nature") + .HasColumnType("int"); + + b.Property("PracticeHours") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("TotalHours") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("CourseCategoryId"); + + b.HasIndex("IsArchived"); + + b.HasIndex("CollegeId", "Nature"); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Courses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); + + b.Property("CancelDate") + .HasColumnType("date"); + + b.Property("CancelWeek") + .HasColumnType("int"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DayOfWeek") + .HasColumnType("int"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("SourceClassroomId") + .HasColumnType("char(36)"); + + b.Property("SourceDate") + .HasColumnType("date"); + + b.Property("SourcePeriodCount") + .HasColumnType("int"); + + b.Property("SourceScheduleEntryId") + .HasColumnType("char(36)"); + + b.Property("SourceStartPeriod") + .HasColumnType("int"); + + b.Property("SourceWeek") + .HasColumnType("int"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("SubstituteTeacherId") + .HasColumnType("char(36)"); + + b.Property("TargetDate") + .HasColumnType("date"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ApplicantUserId"); + + b.HasIndex("ClassroomId"); + + b.HasIndex("SubstituteTeacherId"); + + b.HasIndex("SourceScheduleEntryId", "SourceWeek"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("TeachingTaskId", "Status"); + + b.ToTable("CourseAdjustments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("CourseCategories"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseSelectionOfferingId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EnrolledAt") + .HasColumnType("datetime(6)"); + + b.Property("EnrollmentType") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WaitlistResolutionReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("WaitlistResolvedAt") + .HasColumnType("datetime(6)"); + + b.Property("WaitlistedAt") + .HasColumnType("datetime(6)"); + + b.Property("WithdrawnAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CourseSelectionOfferingId", "StudentId") + .IsUnique(); + + b.HasIndex("StudentId", "Status"); + + b.HasIndex("CourseSelectionOfferingId", "Status", "WaitlistedAt") + .HasDatabaseName("IX_CE_Offering_Status_WaitlistedAt"); + + b.ToTable("CourseEnrollments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EffectiveGrade") + .HasColumnType("int"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MajorId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("OriginalCourseId") + .HasColumnType("char(36)"); + + b.Property("SubstituteCourseId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MajorId"); + + b.HasIndex("SubstituteCourseId"); + + b.HasIndex("IsEnabled", "OriginalCourseId"); + + b.HasIndex("OriginalCourseId", "SubstituteCourseId", "MajorId", "EffectiveGrade") + .IsUnique(); + + b.ToTable("CourseEquivalencyRules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); + + b.ToTable("CourseExemptions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("Below60Count") + .HasColumnType("int"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("From60To69Count") + .HasColumnType("int"); + + b.Property("From70To79Count") + .HasColumnType("int"); + + b.Property("From80To89Count") + .HasColumnType("int"); + + b.Property("From90To100Count") + .HasColumnType("int"); + + b.Property("HighestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("LowestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("PassRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("PassedCount") + .HasColumnType("int"); + + b.Property("Scope") + .HasColumnType("int"); + + b.Property("ScopeEntityId") + .HasColumnType("char(36)"); + + b.Property("StudentCount") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Scope", "ScopeEntityId"); + + b.HasIndex("CourseId", "AcademicTermId", "Scope", "ScopeEntityId") + .IsUnique() + .HasDatabaseName("UX_CourseGradeStatistics_Scope"); + + b.ToTable("CourseGradeStatistics"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GradeSheetId"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("CourseGradeStatisticsRefreshJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BatchSize") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IntervalSeconds") + .HasColumnType("int"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("LastRunAt") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Key") + .IsUnique(); + + b.ToTable("CourseGradeStatisticsRefreshSettings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("CourseGroups"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseGroupId") + .HasColumnType("char(36)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("RecommendedSemester") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CourseId"); + + b.HasIndex("CourseGroupId", "CourseId") + .IsUnique(); + + b.ToTable("CourseGroupCourses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("PrerequisiteCourseId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PrerequisiteCourseId"); + + b.HasIndex("CourseId", "PrerequisiteCourseId") + .IsUnique(); + + b.ToTable("CoursePrerequisites"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("CourseSelectionRoundId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsOpenToAll") + .HasColumnType("tinyint(1)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("CourseSelectionRoundId", "TeachingTaskId") + .IsUnique(); + + b.ToTable("CourseSelectionOfferings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("MaxCourseCount") + .HasColumnType("int"); + + b.Property("MaxCredits") + .HasPrecision(6, 1) + .HasColumnType("decimal(6,1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Scope") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WithdrawalEndsAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Status"); + + b.ToTable("CourseSelectionRounds"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseSelectionRoundId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Grade"); + + b.HasIndex("CourseSelectionRoundId", "Grade") + .IsUnique(); + + b.ToTable("CourseSelectionRoundGrades"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseEquivalencyRuleId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("OriginalCourseId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("SubstituteCourseId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CourseEquivalencyRuleId"); + + b.HasIndex("OriginalCourseId"); + + b.HasIndex("SubstituteCourseId"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("StudentId", "OriginalCourseId") + .IsUnique(); + + b.ToTable("CourseSubstitutions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurriculumModuleId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("RecommendedSemester") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CourseId"); + + b.HasIndex("CurriculumModuleId", "CourseId") + .IsUnique(); + + b.ToTable("CurriculumCourses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurriculumPlanId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("RequiredCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CurriculumPlanId", "Code") + .IsUnique(); + + b.ToTable("CurriculumModules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("EffectiveGrade") + .HasColumnType("int"); + + b.Property("MajorId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TotalCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.HasKey("Id"); + + b.HasIndex("Status", "EffectiveGrade"); + + b.HasIndex("MajorId", "EffectiveGrade", "Version") + .IsUnique(); + + b.ToTable("CurriculumPlans"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedCount") + .HasColumnType("int"); + + b.Property("ErrorCount") + .HasColumnType("int"); + + b.Property("ErrorJson") + .HasColumnType("longtext"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("FileSha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("Module") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("Target") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("TotalRows") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CollegeId", "CreatedAt"); + + b.HasIndex("CreatedAt", "Id"); + + b.HasIndex("CreatedByUserId", "CreatedAt"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("DataImportBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); + + b.ToTable("DeferredExams"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("CalculationStatus") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DegreeName") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); + + b.Property("EnrollmentYear") + .HasColumnType("int"); + + b.Property("GraduationYear") + .HasColumnType("int"); + + b.Property("MinimumGradePoint") + .HasPrecision(3, 2) + .HasColumnType("decimal(3,2)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GraduationYear", "Status"); + + b.ToTable("DegreeAwardBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AverageGradePoint") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); + + b.Property("CalculatedConclusion") + .HasColumnType("int"); + + b.Property("Conclusion") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DegreeAwardBatchId") + .HasColumnType("char(36)"); + + b.Property("ExceptionReason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("GraduationAuditResultId") + .HasColumnType("char(36)"); + + b.Property("IsOverridden") + .HasColumnType("tinyint(1)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GraduationAuditResultId"); + + b.HasIndex("StudentId"); + + b.HasIndex("Conclusion", "IsOverridden"); + + b.HasIndex("DegreeAwardBatchId", "StudentId") + .IsUnique(); + + b.ToTable("DegreeAwardResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AssignedCount") + .HasColumnType("int"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("Mode") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("RequestPayload") + .HasColumnType("longtext"); + + b.Property("RequestedCount") + .HasColumnType("int"); + + b.Property("ResultPayload") + .HasColumnType("longtext"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("CreatedByUserId"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("DormitoryAllocationBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CounselorComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CounselorReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("CounselorReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentBedId") + .HasColumnType("char(36)"); + + b.Property("FinalComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("FinalReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("FinalReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("PreferredBuildingId") + .HasColumnType("char(36)"); + + b.Property("PreferredRoomId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TargetBedId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PreferredBuildingId"); + + b.HasIndex("PreferredRoomId"); + + b.HasIndex("Status", "SubmittedAt"); + + b.HasIndex("StudentId", "Status"); + + b.ToTable("DormitoryApplications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BedNumber") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryRoomId") + .HasColumnType("char(36)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryRoomId", "BedNumber") + .IsUnique(); + + b.ToTable("DormitoryBeds"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CampusId") + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("FloorCount") + .HasColumnType("int"); + + b.Property("GenderPolicy") + .HasColumnType("int"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CampusId"); + + b.HasIndex("Code") + .IsUnique(); + + b.ToTable("DormitoryBuildings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("InspectionDate") + .HasColumnType("date"); + + b.Property("Inspector") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("PublicationCount") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Status", "InspectionDate"); + + b.ToTable("DormitoryHygieneBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("SelectedBatchCount") + .HasColumnType("int"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentCount") + .HasColumnType("int"); + + b.Property("StudentWithoutScoreCount") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedByUserId"); + + b.HasIndex("AcademicTermId", "Status", "CreatedAt"); + + b.ToTable("DormitoryHygieneCalculations"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryHygieneBatchId") + .HasColumnType("char(36)"); + + b.Property("DormitoryHygieneCalculationId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryHygieneBatchId"); + + b.HasIndex("DormitoryHygieneCalculationId", "DormitoryHygieneBatchId") + .IsUnique(); + + b.ToTable("DormitoryHygieneCalculationBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BeddingScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("BelongingsScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryHygieneBatchId") + .HasColumnType("char(36)"); + + b.Property("DormitoryRoomId") + .HasColumnType("char(36)"); + + b.Property("FacilitiesScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("FloorScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("IsViolation") + .HasColumnType("tinyint(1)"); + + b.Property("Issues") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("SafetyScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryHygieneBatchId", "DormitoryRoomId") + .IsUnique(); + + b.HasIndex("DormitoryRoomId", "DormitoryHygieneBatchId"); + + b.ToTable("DormitoryHygieneScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryHygieneCalculationId") + .HasColumnType("char(36)"); + + b.Property("ExpectedBatchCount") + .HasColumnType("int"); + + b.Property("IncludedScoreCount") + .HasColumnType("int"); + + b.Property("MissingScoreCount") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ViolationCount") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("AcademicTermId", "StudentId"); + + b.HasIndex("DormitoryHygieneCalculationId", "StudentId") + .IsUnique(); + + b.ToTable("DormitoryHygieneStudentSummaries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CheckInDate") + .HasColumnType("date"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryBedId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryBedId") + .IsUnique(); + + b.HasIndex("StudentId") + .IsUnique(); + + b.ToTable("DormitoryOccupancies"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryBuildingId") + .HasColumnType("char(36)"); + + b.Property("Floor") + .HasColumnType("int"); + + b.Property("GenderPolicy") + .HasColumnType("int"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("RoomNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryBuildingId", "RoomNumber") + .IsUnique(); + + b.ToTable("DormitoryRooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Action") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DormitoryAllocationBatchId") + .HasColumnType("char(36)"); + + b.Property("DormitoryApplicationId") + .HasColumnType("char(36)"); + + b.Property("EffectiveDate") + .HasColumnType("date"); + + b.Property("FromBedId") + .HasColumnType("char(36)"); + + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); + + b.Property("OperatedByUserId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("ToBedId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("DormitoryAllocationBatchId"); + + b.HasIndex("FromBedId"); + + b.HasIndex("ToBedId"); + + b.HasIndex("StudentId", "EffectiveDate"); + + b.HasIndex("StudentId", "OccurredAt"); + + b.ToTable("DormitoryStayHistories"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EvaluationSetupId") + .HasColumnType("char(36)"); + + b.Property("MaxScore") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("EvaluationSetupId", "SortOrder"); + + b.ToTable("EvaluationDimensions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EvaluationSetupId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("EvaluationSetupId", "StudentId", "TeachingTaskId") + .IsUnique(); + + b.ToTable("EvaluationRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => + { + b.Property("EvaluationRecordId") + .HasColumnType("char(36)"); + + b.Property("EvaluationDimensionId") + .HasColumnType("char(36)"); + + b.Property("Score") + .HasColumnType("int"); + + b.HasKey("EvaluationRecordId", "EvaluationDimensionId"); + + b.HasIndex("EvaluationDimensionId"); + + b.ToTable("EvaluationScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Status"); + + b.ToTable("EvaluationSetups"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamArrangementJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActivePlanId") + .HasColumnType("char(36)"); + + b.Property("AssignClassrooms") + .HasColumnType("tinyint(1)"); + + b.Property("AssignInvigilators") + .HasColumnType("tinyint(1)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("PlanId") + .HasColumnType("char(36)"); + + b.Property("ProcessedSessions") + .HasColumnType("int"); + + b.Property("ProjectIdsJson") + .HasColumnType("longtext"); + + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); + + b.Property("ResultMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("SessionIdsJson") + .HasColumnType("longtext"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TotalSessions") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("RequestedByUserId"); + + b.HasIndex("Kind", "ActivePlanId") + .IsUnique() + .HasDatabaseName("UX_ExamArrangementJobs_Kind_ActivePlan"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("Kind", "PlanId", "CreatedAt") + .HasDatabaseName("IX_ExamArrangementJobs_Kind_Plan_CreatedAt"); + + b.ToTable("ExamArrangementJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Status"); + + b.ToTable("ExamPlans"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPublishJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActivePlanId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentStep") + .HasColumnType("longtext"); + + b.Property("ErrorMessage") + .HasColumnType("longtext"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("PlanId") + .HasColumnType("char(36)"); + + b.Property("ProjectIdsJson") + .HasColumnType("longtext"); + + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("ExamPublishJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("ExamDate") + .HasColumnType("date"); + + b.Property("ExamPlanId") + .HasColumnType("char(36)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("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"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomInvigilator", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.HasKey("ExamRoomId", "TeacherId"); + + b.HasIndex("TeacherId") + .HasDatabaseName("IX_ExamRoomInvigilators_TeacherId"); + + b.ToTable("ExamRoomInvigilators"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomSession", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); + + b.Property("ExamSessionId") + .HasColumnType("char(36)"); + + b.HasKey("ExamRoomId", "ExamSessionId"); + + b.HasIndex("ExamSessionId") + .HasDatabaseName("IX_ExamRoomSessions_SessionId"); + + b.ToTable("ExamRoomSessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSeatAssignment", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("ExamSessionId") + .HasColumnType("char(36)"); + + b.Property("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"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("ExamDate") + .HasColumnType("date"); + + b.Property("ExamPlanId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); + + b.Property("RequiredBuildingIds") + .HasColumnType("longtext"); + + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ClassroomId"); + + b.HasIndex("RequiredBuildingId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("ExamPlanId", "ExamDate"); + + b.HasIndex("ExamPlanId", "StartsAt"); + + b.ToTable("ExamSessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => + { + b.Property("ExamSessionId") + .HasColumnType("char(36)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.HasKey("ExamSessionId", "TeacherId"); + + b.HasIndex("TeacherId"); + + b.ToTable("ExamSessionInvigilators"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSignInExportJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("FileBytes") + .HasColumnType("longblob"); + + b.Property("FileName") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("FileSize") + .HasColumnType("int"); + + b.Property("FilterJson") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("PlanId") + .HasColumnType("char(36)"); + + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("RequestedByUserId"); + + b.HasIndex("PlanId", "CreatedAt"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("ExamSignInExportJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BookedAt") + .HasColumnType("datetime(6)"); + + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); + + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("ExperimentProjectId", "StudentId") + .IsUnique(); + + b.HasIndex("ExperimentSessionId", "Status", "BookedAt"); + + b.ToTable("ExperimentBookings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("PublishedProjectCount") + .HasColumnType("int"); + + b.Property("RefreshedAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("TotalWeight") + .HasPrecision(8, 1) + .HasColumnType("decimal(8,1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeightedAverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("TeachingTaskId", "StudentId") + .IsUnique(); + + b.ToTable("ExperimentCourseGrades"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentGradeSheetId") + .HasColumnType("char(36)"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Weight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentGradeSheetId", "SortOrder"); + + b.ToTable("ExperimentGradeItems"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => + { + b.Property("ExperimentGradeRecordId") + .HasColumnType("char(36)"); + + b.Property("ExperimentGradeItemId") + .HasColumnType("char(36)"); + + b.Property("Comment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("ExperimentGradeRecordId", "ExperimentGradeItemId"); + + b.HasIndex("ExperimentGradeItemId"); + + b.ToTable("ExperimentGradeItemScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AttemptNumber") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentGradeSheetId") + .HasColumnType("char(36)"); + + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); + + b.Property("IsLate") + .HasColumnType("tinyint(1)"); + + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); + + b.Property("ParticipationStatus") + .HasColumnType("int"); + + b.Property("SafetyViolation") + .HasColumnType("tinyint(1)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmissionReference") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeacherComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentSessionId"); + + b.HasIndex("StudentId"); + + b.HasIndex("ExperimentGradeSheetId", "StudentId") + .IsUnique(); + + b.ToTable("ExperimentGradeRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ContributionWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); + + b.Property("PassScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentProjectId") + .IsUnique(); + + b.ToTable("ExperimentGradeSheets"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ArrangementMode") + .HasColumnType("int"); + + b.Property("ClosedAt") + .HasColumnType("datetime(6)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("EndDate") + .HasColumnType("date"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Requirements") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("ScheduleEntryId") + .HasColumnType("char(36)"); + + b.Property("ScheduleWeek") + .HasColumnType("int"); + + b.Property("SelectionEndsAt") + .HasColumnType("datetime(6)"); + + b.Property("SelectionStartsAt") + .HasColumnType("datetime(6)"); + + b.Property("StartDate") + .HasColumnType("date"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ScheduleEntryId"); + + b.HasIndex("Status", "StartDate", "EndDate"); + + b.HasIndex("TeachingTaskId", "Code", "ScheduleEntryId", "ScheduleWeek") + .IsUnique(); + + b.ToTable("ExperimentProjects"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("ReservedCount") + .HasColumnType("int"); + + b.Property("SessionDate") + .HasColumnType("date"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentProjectId", "SessionDate", "StartPeriod"); + + b.HasIndex("ClassroomId", "SessionDate", "Status", "StartPeriod"); + + b.ToTable("ExperimentSessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeacherId"); + + b.HasIndex("ExperimentSessionId", "TeacherId") + .IsUnique(); + + b.ToTable("ExperimentSessionInstructors"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AuthorUserId") + .HasColumnType("char(36)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsAnonymous") + .HasColumnType("tinyint(1)"); + + b.Property("ParentCommentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AuthorUserId"); + + b.HasIndex("CourseId", "CreatedAt", "Id"); + + b.HasIndex("ParentCommentId", "CreatedAt", "Id"); + + b.ToTable("GradeAnalyticsComments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CommentId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("CommentId", "UserId", "Type") + .IsUnique(); + + b.ToTable("GradeAnalyticsCommentReactions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GradeModificationId") + .HasColumnType("char(36)"); + + b.Property("GradeRecordId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeacherResponse") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WithdrawnAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GradeModificationId") + .IsUnique(); + + b.HasIndex("GradeRecordId", "Status"); + + b.HasIndex("StudentId", "SubmittedAt"); + + b.ToTable("GradeAppeals"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("SourceSnapshotAt") + .HasColumnType("datetime(6)"); + + b.Property("SourceType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Weight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("Id"); + + b.HasIndex("GradeSheetId", "SortOrder"); + + b.ToTable("GradeItems"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => + { + b.Property("GradeRecordId") + .HasColumnType("char(36)"); + + b.Property("GradeItemId") + .HasColumnType("char(36)"); + + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("GradeRecordId", "GradeItemId"); + + b.HasIndex("GradeItemId"); + + b.ToTable("GradeItemScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); + + b.Property("CollegeReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("CollegeReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentResult") + .HasColumnType("int"); + + b.Property("CurrentScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("FinalReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("FinalReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("GradeRecordId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("RequestedResult") + .HasColumnType("int"); + + b.Property("RequestedScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GradeRecordId"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("GradeModifications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExamStatus") + .HasColumnType("int"); + + b.Property("FinalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("GradePoint") + .HasPrecision(3, 1) + .HasColumnType("decimal(3,1)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); + + b.Property("Notes") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("RegularScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("Result") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PublishedAt"); + + b.HasIndex("GradeSheetId", "StudentId") + .IsUnique(); + + b.HasIndex("StudentId", "TotalScore"); + + b.ToTable("GradeRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ComponentType") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GradeItemId") + .HasColumnType("char(36)"); + + b.Property("GradeRecordId") + .HasColumnType("char(36)"); + + b.Property("GradeSubmissionBatchId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GradeSubmissionBatchId"); + + b.HasIndex("SubmittedByUserId"); + + b.HasIndex("GradeRecordId", "ComponentType", "GradeItemId") + .IsUnique(); + + b.ToTable("GradeScoreSubmissions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EvaluationMethod") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("FinalWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("RegularWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("IsArchived"); + + b.HasIndex("Status"); + + b.HasIndex("TeachingTaskId") + .IsUnique(); + + b.ToTable("GradeSheets"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("SubmittedByUserId"); + + b.HasIndex("GradeSheetId", "Status"); + + b.ToTable("GradeSubmissionBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => + { + b.Property("GradeSubmissionBatchId") + .HasColumnType("char(36)"); + + b.Property("GradeRecordId") + .HasColumnType("char(36)"); + + b.HasKey("GradeSubmissionBatchId", "GradeRecordId"); + + b.HasIndex("GradeRecordId"); + + b.ToTable("GradeSubmissionBatchRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("CalculationStatus") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EnrollmentYear") + .HasColumnType("int"); + + b.Property("GraduationYear") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Status"); + + b.HasIndex("GraduationYear", "EnrollmentYear"); + + b.ToTable("GraduationAuditBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CalculatedConclusion") + .HasColumnType("int"); + + b.Property("Conclusion") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurriculumPlanId") + .HasColumnType("char(36)"); + + b.Property("EarnedCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); + + b.Property("FailedCourseCount") + .HasColumnType("int"); + + b.Property("GraduationAuditBatchId") + .HasColumnType("char(36)"); + + b.Property("IsOverridden") + .HasColumnType("tinyint(1)"); + + b.Property("MissingCourseNames") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("PassedRequiredCourseCount") + .HasColumnType("int"); + + b.Property("RequiredCourseCount") + .HasColumnType("int"); + + b.Property("RequiredCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("StudentStatusSnapshot") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CurriculumPlanId"); + + b.HasIndex("StudentId"); + + b.HasIndex("Conclusion", "IsOverridden"); + + b.HasIndex("GraduationAuditBatchId", "StudentId") + .IsUnique(); + + b.ToTable("GraduationAuditResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClosedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GraduationYear") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GraduationYear", "Status"); + + b.ToTable("GraduationClearanceBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GraduationClearanceBatchId") + .HasColumnType("char(36)"); + + b.Property("IsRequired") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ResponsibleRole") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("ResponsibleUnit") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GraduationClearanceBatchId", "Code") + .IsUnique(); + + b.ToTable("GraduationClearanceItems"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CompletedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GraduationClearanceItemId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GraduationClearanceItemId", "StudentId") + .IsUnique(); + + b.HasIndex("StudentId", "Status"); + + b.ToTable("GraduationClearanceRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DegreeType") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SchoolingYears") + .HasColumnType("int"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + b.HasIndex("CollegeId"); + + b.HasIndex("IsEnabled", "SortOrder"); + + b.ToTable("Majors"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedSessions") + .HasColumnType("int"); + + b.Property("EnrolledStudents") + .HasColumnType("int"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("MakeupExamPlanId") + .HasColumnType("char(36)"); + + b.Property("MessagesJson") + .HasColumnType("longtext"); + + b.Property("ProcessedCourses") + .HasColumnType("int"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TotalCourses") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("MakeupExamPlanId", "CreatedAt"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("MakeupExamAutoJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => + { + b.Property("MakeupExamSessionId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("MakeupScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("Reason") + .HasColumnType("int"); + + b.Property("SourceDeferredExamId") + .HasColumnType("char(36)"); + + b.Property("SourceGradeRecordId") + .HasColumnType("char(36)"); + + b.HasKey("MakeupExamSessionId", "StudentId"); + + b.HasIndex("SourceDeferredExamId"); + + b.HasIndex("SourceGradeRecordId"); + + b.HasIndex("StudentId", "MakeupExamSessionId"); + + b.ToTable("MakeupExamEnrollments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Status"); + + b.ToTable("MakeupExamPlans"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("ExamDate") + .HasColumnType("date"); + + b.Property("MakeupExamPlanId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); + + b.Property("RequiredBuildingIds") + .HasColumnType("longtext"); + + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ClassroomId"); + + b.HasIndex("RequiredBuildingId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("MakeupExamPlanId", "ExamDate"); + + b.HasIndex("MakeupExamPlanId", "StartsAt"); + + b.ToTable("MakeupExamSessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => + { + b.Property("MakeupExamSessionId") + .HasColumnType("char(36)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.HasKey("MakeupExamSessionId", "TeacherId"); + + b.HasIndex("TeacherId"); + + b.ToTable("MakeupExamSessionInvigilators"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AudienceId") + .HasColumnType("char(36)"); + + b.Property("AudienceName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("AudienceType") + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("LinkUrl") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("RecipientCount") + .HasColumnType("int"); + + b.Property("SenderName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("SenderUserId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("SenderUserId", "CreatedAt"); + + b.ToTable("MessageDispatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExternalDeliveryPlannedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsRead") + .HasColumnType("tinyint(1)"); + + b.Property("LinkUrl") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("MessageDispatchId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("MessageDispatchId"); + + b.HasIndex("ExternalDeliveryPlannedAt", "CreatedAt"); + + b.HasIndex("UserId", "CreatedAt", "Id"); + + b.HasIndex("UserId", "Category", "CreatedAt", "Id"); + + b.HasIndex("UserId", "IsRead", "CreatedAt", "Id"); + + b.ToTable("Notifications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AttemptCount") + .HasColumnType("int"); + + b.Property("Channel") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DeliveredAt") + .HasColumnType("datetime(6)"); + + b.Property("LastAttemptAt") + .HasColumnType("datetime(6)"); + + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("NextAttemptAt") + .HasColumnType("datetime(6)"); + + b.Property("NotificationId") + .HasColumnType("char(36)"); + + b.Property("ProviderMessageId") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("TargetKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("WebPushSubscriptionId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("WebPushSubscriptionId"); + + b.HasIndex("State", "NextAttemptAt"); + + b.HasIndex("NotificationId", "Channel", "TargetKey") + .IsUnique(); + + b.HasIndex("UserId", "CreatedAt", "Id"); + + b.ToTable("NotificationDeliveries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EmailEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("QuietEndMinute") + .HasColumnType("int"); + + b.Property("QuietHoursEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("QuietStartMinute") + .HasColumnType("int"); + + b.Property("TimeZoneId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("WebPushEnabled") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("UserId") + .IsUnique(); + + b.ToTable("NotificationPreferences"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("InvalidatedAt") + .HasColumnType("datetime(6)"); + + b.Property("InvalidatedByUserId") + .HasColumnType("char(36)"); + + b.Property("InvalidationReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("IssuedAt") + .HasColumnType("datetime(6)"); + + b.Property("IssuedByUserId") + .HasColumnType("char(36)"); + + b.Property("PdfContent") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("PdfSha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Purpose") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ReissuedFromDocumentId") + .HasColumnType("char(36)"); + + b.Property("SnapshotJson") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("VerificationCodeHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("DocumentNumber") + .IsUnique(); + + b.HasIndex("InvalidatedByUserId"); + + b.HasIndex("IssuedByUserId"); + + b.HasIndex("ReissuedFromDocumentId") + .IsUnique(); + + b.HasIndex("VerificationCodeHash") + .IsUnique(); + + b.HasIndex("Status", "IssuedAt"); + + b.HasIndex("StudentId", "IssuedAt"); + + b.ToTable("OfficialDocuments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DownloadedByUserId") + .HasColumnType("char(36)"); + + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("OfficialDocumentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("DownloadedByUserId", "CreatedAt"); + + b.HasIndex("OfficialDocumentId", "CreatedAt"); + + b.ToTable("OfficialDocumentDownloads"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExamCode") + .HasMaxLength(60) + .HasColumnType("varchar(60)"); + + b.Property("ExamDate") + .HasColumnType("date"); + + b.Property("LevelOptions") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("MaxScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("MetricKind") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("Organizer") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("PublicationCount") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Status", "ExamDate"); + + b.ToTable("OtherExamBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AttemptNumber") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); + + b.Property("Level") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("OtherExamBatchId") + .HasColumnType("char(36)"); + + b.Property("Score") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId", "OtherExamBatchId"); + + b.HasIndex("OtherExamBatchId", "StudentId", "AttemptNumber") + .IsUnique(); + + b.ToTable("OtherExamResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicYear") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); + + b.Property("PublicationCount") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("StandardVersion") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TestDate") + .HasColumnType("date"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicYear", "TestDate"); + + b.ToTable("PhysicalTestBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BonusScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ItemCode") + .HasColumnType("int"); + + b.Property("PhysicalTestRecordId") + .HasColumnType("char(36)"); + + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("Unit") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Value") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("Weight") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); + + b.Property("WeightedScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("Id"); + + b.HasIndex("PhysicalTestRecordId", "ItemCode") + .IsUnique(); + + b.ToTable("PhysicalTestItemResults"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BonusScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Grade") + .HasColumnType("int"); + + b.Property("GradeLevel") + .HasColumnType("int"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PhysicalTestBatchId") + .HasColumnType("char(36)"); + + b.Property("SpecialReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("StandardScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PhysicalTestBatchId", "StudentId") + .IsUnique(); + + b.HasIndex("StudentId", "PhysicalTestBatchId"); + + b.ToTable("PhysicalTestRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DayOfWeek") + .HasColumnType("int"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("ScheduleEntryId") + .HasColumnType("char(36)"); + + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Week") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClassroomId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("ScheduleEntryId", "Week") + .IsUnique(); + + b.HasIndex("AcademicTermId", "TeachingTaskId", "Week"); + + b.HasIndex("AcademicTermId", "Week", "DayOfWeek", "StartPeriod", "ClassroomId"); + + b.HasIndex("SchedulePlanId", "ClassroomId", "Week", "DayOfWeek", "StartPeriod"); + + b.ToTable("PublishedScheduleOccurrences"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DayOfWeek") + .HasColumnType("int"); + + b.Property("EndWeek") + .HasColumnType("int"); + + b.Property("Kind") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PeriodCount") + .HasColumnType("int"); + + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); + + b.Property("StartPeriod") + .HasColumnType("int"); + + b.Property("StartWeek") + .HasColumnType("int"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeekPattern") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ClassroomId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("SchedulePlanId", "DayOfWeek", "StartPeriod"); + + b.ToTable("ScheduleEntries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("ClassGapWeight") + .HasColumnType("int"); + + b.Property("ClassSameDayWeight") + .HasColumnType("int"); + + b.Property("ConsecutiveClassWeight") + .HasColumnType("int"); + + b.Property("CoursePreferenceWeight") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EarlyPeriodPenalty") + .HasColumnType("int"); + + b.Property("GeneticGenerationCount") + .HasColumnType("int"); + + b.Property("GeneticMutationRatePercent") + .HasColumnType("int"); + + b.Property("GeneticPopulationSize") + .HasColumnType("int"); + + b.Property("LatePeriodPenalty") + .HasColumnType("int"); + + b.Property("RoomCapacityWasteWeight") + .HasColumnType("int"); + + b.Property("TeacherSameDayWeight") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId") + .IsUnique(); + + b.ToTable("ScheduleOptimizationSettings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Status"); + + b.HasIndex("AcademicTermId", "Version") + .IsUnique(); + + b.ToTable("SchedulePlans"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("ActiveAcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CompletedSteps") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); + + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); + + b.Property("StartedAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TotalSteps") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ActiveAcademicTermId") + .IsUnique(); + + b.HasIndex("RequestedByUserId"); + + b.HasIndex("SchedulePlanId", "CreatedAt"); + + b.HasIndex("Status", "CreatedAt"); + + b.ToTable("SchedulePublishJobs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("time"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("PeriodNumber") + .HasColumnType("int"); + + b.Property("StartsAt") + .HasColumnType("time"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "PeriodNumber") + .IsUnique(); + + b.ToTable("ScheduleTimeSlots"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AdministrativeClassId") + .HasColumnType("char(36)"); + + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("Biography") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CurrentAddress") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("DateOfBirth") + .HasColumnType("date"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("EmergencyContactName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("EmergencyContactPhone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("EmergencyContactRelationship") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("EnglishName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("EnrollmentDate") + .HasColumnType("date"); + + b.Property("EnrollmentYear") + .HasColumnType("int"); + + b.Property("Ethnicity") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Gender") + .HasColumnType("int"); + + b.Property("HouseholdAddress") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("IdCardNumber") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Nationality") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("NativePlace") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("PoliticalStatus") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PostalCode") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Qq") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("SpecialNeeds") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("SpecialTags") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("WeChat") + .HasMaxLength(60) + .HasColumnType("varchar(60)"); + + b.HasKey("Id"); + + b.HasIndex("EnrollmentYear"); + + b.HasIndex("IsArchived"); + + b.HasIndex("StudentNumber") + .IsUnique(); + + b.HasIndex("UserId"); + + b.HasIndex("AdministrativeClassId", "Status"); + + b.ToTable("Students"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CourseCount") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Gpa") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeightedAverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.HasIndex("CalculatedAt"); + + b.HasIndex("StudentId") + .IsUnique(); + + b.ToTable("StudentAcademicStatistics"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CourseCount") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Gpa") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeightedAverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId"); + + b.HasIndex("StudentId", "AcademicTermId") + .IsUnique(); + + b.ToTable("StudentAcademicTermStatistics"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentLeave", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndAt") + .HasColumnType("datetime(6)"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("StartAt") + .HasColumnType("datetime(6)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Status", "CreatedAt"); + + b.HasIndex("StudentId", "CreatedAt"); + + b.ToTable("StudentLeaves"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DischargeDate") + .HasColumnType("date"); + + b.Property("EnlistmentChangeId") + .HasColumnType("char(36)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReportedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReportedByUserId") + .HasColumnType("char(36)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("EnlistmentChangeId"); + + b.HasIndex("StudentId", "ReportedAt"); + + b.ToTable("StudentMilitaryDischargeReports"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AffectedTermId") + .HasColumnType("char(36)"); + + b.Property("ApprovedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DischargeDate") + .HasColumnType("date"); + + b.Property("OriginalClassId") + .HasColumnType("char(36)"); + + b.Property("OriginalStatus") + .HasColumnType("int"); + + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("ReceivingCollegeId") + .HasColumnType("char(36)"); + + b.Property("ReceivingCollegeReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReceivingCollegeReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReceivingCollegeReviewerId") + .HasColumnType("char(36)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ServiceStartDate") + .HasColumnType("date"); + + b.Property("State") + .IsConcurrencyToken() + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); + + b.Property("TargetClassId") + .HasColumnType("char(36)"); + + b.Property("TargetStatus") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AffectedTermId"); + + b.HasIndex("OriginalClassId"); + + b.HasIndex("TargetClassId"); + + b.HasIndex("StudentId", "State"); + + b.ToTable("StudentStatusChanges"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentStatusChangeId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); + + b.ToTable("StudentStatusChangeCourseEffects"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActorUserId") + .HasColumnType("char(36)"); + + b.Property("Comment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("FromState") + .HasColumnType("int"); + + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); + + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); + + b.Property("ToState") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentStatusChangeId", "OccurredAt"); + + b.ToTable("StudentStatusChangeEvents"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); + + b.Property("CancelledByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentBookingId") + .HasColumnType("char(36)"); + + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); + + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentBookingId"); + + b.HasIndex("ExperimentSessionId"); + + b.HasIndex("StudentId"); + + b.HasIndex("StudentStatusChangeId", "ExperimentBookingId") + .IsUnique(); + + b.ToTable("StudentStatusChangeExperimentEffects"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("OriginalGradeRecordId") + .HasColumnType("char(36)"); + + b.Property("SnapshotJson") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("GradeSheetId"); + + b.HasIndex("TeachingTaskId"); + + b.HasIndex("StudentId", "TeachingTaskId"); + + b.HasIndex("StudentStatusChangeId", "OriginalGradeRecordId") + .IsUnique(); + + b.ToTable("StudentStatusChangeGradeArchives"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); + + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Gender") + .HasColumnType("int"); + + b.Property("HireDate") + .HasColumnType("date"); + + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); + + b.Property("IsExternal") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TeacherNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("Title") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("IsArchived"); + + b.HasIndex("TeacherNumber") + .IsUnique(); + + b.HasIndex("UserId"); + + b.HasIndex("CollegeId", "Status"); + + b.ToTable("Teachers"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); + + b.Property("Statement") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("CourseId"); + + b.HasIndex("ReviewedByUserId"); + + b.HasIndex("TeacherId"); + + b.HasIndex("Status", "AcademicTermId"); + + b.HasIndex("AcademicTermId", "TeacherId", "CourseId") + .IsUnique(); + + b.ToTable("TeacherCourseApplications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("Actions") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DueDate") + .HasColumnType("date"); + + b.Property("ProblemSummary") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeacherId"); + + b.HasIndex("TeachingTaskId", "TeacherId") + .IsUnique(); + + b.HasIndex("AcademicTermId", "TeacherId", "Status"); + + b.ToTable("TeachingImprovementPlans"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Comment") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsApproved") + .HasColumnType("tinyint(1)"); + + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReviewerUserId") + .HasColumnType("char(36)"); + + b.Property("TeachingImprovementPlanId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingImprovementPlanId", "ReviewedAt"); + + b.ToTable("TeachingImprovementReviews"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Kind") + .HasColumnType("int"); + + b.Property("Message") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("SentAt") + .HasColumnType("datetime(6)"); + + b.Property("SentByUserId") + .HasColumnType("char(36)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingTaskId", "Kind", "SentAt"); + + b.ToTable("TeachingMonitoringReminders"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExperimentGradeDeadline") + .HasColumnType("datetime(6)"); + + b.Property("GradeDeadline") + .HasColumnType("datetime(6)"); + + b.Property("ReminderCooldownHours") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId") + .IsUnique(); + + b.ToTable("TeachingMonitoringSettings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EvaluatorUserId") + .HasColumnType("char(36)"); + + b.Property("Issues") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Recommendation") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Score") + .HasColumnType("int"); + + b.Property("Source") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("Strengths") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "TeachingTaskId", "Source"); + + b.HasIndex("TeachingTaskId", "EvaluatorUserId", "Source") + .IsUnique(); + + b.ToTable("TeachingObservationEvaluations"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("Capacity") + .HasColumnType("int"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndWeek") + .HasColumnType("int"); + + b.Property("GenerationBatchCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("SchedulingMode") + .HasColumnType("int"); + + b.Property("StartWeek") + .HasColumnType("int"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("TaskNumber") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("WeeklyHours") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CourseId"); + + b.HasIndex("TaskNumber") + .IsUnique(); + + b.HasIndex("AcademicTermId", "Status"); + + b.ToTable("TeachingTasks"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => + { + b.Property("TeachingTaskScheduleConstraintId") + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); + + b.HasIndex("ClassroomId"); + + b.ToTable("TeachingTaskAllowedClassrooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => + { + b.Property("TeachingTaskScheduleConstraintId") + .HasColumnType("char(36)"); + + b.Property("ClassroomId") + .HasColumnType("char(36)"); + + b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); + + b.HasIndex("ClassroomId"); + + b.ToTable("TeachingTaskAllowedExperimentClassrooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => + { + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("AdministrativeClassId") + .HasColumnType("char(36)"); + + b.HasKey("TeachingTaskId", "AdministrativeClassId"); + + b.HasIndex("AdministrativeClassId"); + + b.ToTable("TeachingTaskClasses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Label") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("LowerBound") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("SortOrder") + .HasColumnType("int"); + + b.Property("StudentCount") + .HasColumnType("int"); + + b.Property("TeachingTaskGradeStatisticId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UpperBound") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.HasKey("Id"); + + b.HasIndex("TeachingTaskGradeStatisticId", "SortOrder") + .IsUnique(); + + b.ToTable("TeachingTaskGradeScoreBands"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CourseId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExcellentCount") + .HasColumnType("int"); + + b.Property("ExcellentRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("GradeSheetId") + .HasColumnType("char(36)"); + + b.Property("HighestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("LowestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("MedianScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); + + b.Property("PassRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); + + b.Property("PassedCount") + .HasColumnType("int"); + + b.Property("StandardDeviation") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); + + b.Property("StudentCount") + .HasColumnType("int"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId"); + + b.HasIndex("GradeSheetId") + .IsUnique(); + + b.HasIndex("TeachingTaskId") + .IsUnique(); + + b.HasIndex("CourseId", "AcademicTermId"); + + b.ToTable("TeachingTaskGradeStatistics"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AllowedDayOfWeeks") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("AllowedExperimentVenueNatures") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EarliestPeriod") + .HasColumnType("int"); + + b.Property("ExperimentRequiredBuildingId") + .HasColumnType("char(36)"); + + b.Property("ExperimentRequiredCampusId") + .HasColumnType("char(36)"); + + b.Property("LatestPeriod") + .HasColumnType("int"); + + b.Property("PreferredDayOfWeeks") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("PreferredEarliestPeriod") + .HasColumnType("int"); + + b.Property("PreferredLatestPeriod") + .HasColumnType("int"); + + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); + + b.Property("RequiredCampusId") + .HasColumnType("char(36)"); + + b.Property("RequiresClassroom") + .HasColumnType("tinyint(1)"); + + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("ExperimentRequiredBuildingId"); + + b.HasIndex("ExperimentRequiredCampusId"); + + b.HasIndex("RequiredBuildingId"); + + b.HasIndex("RequiredCampusId"); + + b.HasIndex("TeachingTaskId") + .IsUnique(); + + b.ToTable("TeachingTaskScheduleConstraints"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => + { + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); + + b.Property("TeacherId") + .HasColumnType("char(36)"); + + b.Property("IsPrimary") + .HasColumnType("tinyint(1)"); + + b.HasKey("TeachingTaskId", "TeacherId"); + + b.HasIndex("TeacherId"); + + b.ToTable("TeachingTaskTeachers"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AccommodationFee") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("AccommodationPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("AdjustmentPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("BasePaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("BaseTuition") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreditCount") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); + + b.Property("CreditFee") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("CreditPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("ReconciliationAdjustment") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("StudentId"); + + b.HasIndex("AcademicTermId", "StudentId") + .IsUnique(); + + b.ToTable("TuitionBills"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); + + b.Property("ConfirmedByUserId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Item") + .HasColumnType("int"); + + b.Property("Method") + .HasColumnType("int"); + + b.Property("ReferenceNumber") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TuitionBillId") + .HasColumnType("char(36)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("TuitionBillId", "Item", "CreatedAt"); + + b.ToTable("TuitionPayments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreditUnitPrice") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); + + b.Property("CreditsLockedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreditsLockedByUserId") + .HasColumnType("char(36)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId") + .IsUnique(); + + b.ToTable("TuitionTermSettings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.VenueDisplayAnnouncement", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("EndsAt") + .HasColumnType("datetime(6)"); + + b.Property("IsPinned") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + b.Property("IsUrgent") + .HasColumnType("tinyint(1)"); + + b.Property("Priority") + .HasColumnType("int"); + + b.Property("Scope") + .HasColumnType("int"); + + b.Property("StartsAt") + .HasColumnType("datetime(6)"); + + b.Property("TargetId") + .HasColumnType("char(36)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("IsPublished", "StartsAt", "EndsAt"); + + b.HasIndex("Scope", "TargetId", "IsPublished"); + + b.ToTable("VenueDisplayAnnouncements"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AcknowledgeComment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("AcknowledgedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Detail") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("StudentId") + .HasColumnType("char(36)"); + + b.Property("TriggerValue") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Status"); + + b.HasIndex("StudentId", "AcademicTermId", "Type") + .IsUnique(); + + b.ToTable("WarningRecords"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AcademicTermId") + .HasColumnType("char(36)"); + + b.Property("AutoCheckEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("CheckDayOfWeek") + .HasColumnType("int"); + + b.Property("CheckHour") + .HasColumnType("int"); + + b.Property("CheckMinute") + .HasColumnType("int"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastCheckAt") + .HasColumnType("datetime(6)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("NotifyCounselor") + .HasColumnType("tinyint(1)"); + + b.Property("NotifyStudent") + .HasColumnType("tinyint(1)"); + + b.Property("Threshold") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); + + b.Property("Type") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("AcademicTermId", "Type") + .IsUnique(); + + b.ToTable("WarningRules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("Auth") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Endpoint") + .IsRequired() + .HasColumnType("text"); + + b.Property("EndpointHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); + + b.Property("LastSeenAt") + .HasColumnType("datetime(6)"); + + b.Property("P256dh") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("EndpointHash") + .IsUnique(); + + b.HasIndex("UserId", "LastSeenAt"); + + b.ToTable("WebPushSubscriptions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("DataScope") + .HasColumnType("int"); + + b.Property("Description") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); + + b.ToTable("AspNetRoles"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AccessFailedCount") + .HasColumnType("int"); + + b.Property("CalendarSubscriptionCreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CalendarSubscriptionStamp") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("CollegeId") + .HasColumnType("char(36)"); + + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LastLoginAt") + .HasColumnType("datetime(6)"); + + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("LockoutEnd") + .HasColumnType("datetime"); + + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.Property("PasswordHash") + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("longtext"); + + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("SecurityStamp") + .HasColumnType("longtext"); + + b.Property("StaffNumber") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); + + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); + + b.HasKey("Id"); + + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); + + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); + + b.HasIndex("StaffNumber"); + + b.ToTable("AspNetUsers"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCeremonyState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ConsumedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); + + b.Property("PayloadJson") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TokenHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.HasKey("Id"); + + b.HasIndex("ExpiresAt"); + + b.HasIndex("TokenHash") + .IsUnique(); + + b.ToTable("PasskeyCeremonyStates"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CredentialId") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); + + b.Property("CredentialIdHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("FriendlyName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsBackedUp") + .HasColumnType("tinyint(1)"); + + b.Property("IsBackupEligible") + .HasColumnType("tinyint(1)"); + + b.Property("LastUsedAt") + .HasColumnType("datetime(6)"); + + b.Property("PublicKey") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("SignatureCounter") + .HasColumnType("int unsigned"); + + b.Property("Transports") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("CredentialIdHash") + .IsUnique(); + + b.HasIndex("UserId"); + + b.ToTable("PasskeyCredentials"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ClientType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); + + b.Property("LastRefreshedAt") + .HasColumnType("datetime(6)"); + + b.Property("ReplacedBySessionId") + .HasColumnType("char(36)"); + + b.Property("RevokedAt") + .HasColumnType("datetime(6)"); + + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TokenHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("TokenHash") + .IsUnique(); + + b.HasIndex("UserId", "ExpiresAt"); + + b.ToTable("RefreshSessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("ConfigurationJson") + .IsRequired() + .HasColumnType("text"); + + b.Property("SchemaVersion") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("UserId"); + + b.ToTable("UserNavigationPreferences"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.AppUpdateRelease", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("BundleContent") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("Channel") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(180) + .HasColumnType("varchar(180)"); + + b.Property("FileSize") + .HasColumnType("bigint"); + + b.Property("NativeVersion") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.Property("Platform") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("PublishedByUserName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ReleaseNotes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("Sha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt"); + + b.HasIndex("Platform", "Channel", "NativeVersion", "Status"); + + b.HasIndex("Platform", "Channel", "NativeVersion", "Version") + .IsUnique(); + + b.ToTable("AppUpdateReleases"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("DurationMilliseconds") + .HasColumnType("bigint"); + + b.Property("ErrorType") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Method") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("Path") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)"); + + b.Property("RequestId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("StatusCode") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("UserName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("CreatedAt", "Id"); + + b.HasIndex("Method", "CreatedAt"); + + b.HasIndex("StatusCode", "CreatedAt"); + + b.HasIndex("UserId", "CreatedAt"); + + b.ToTable("AuditLogs"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.BackgroundJobOutboxMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("JobId") + .HasColumnType("char(36)"); + + b.Property("JobKind") + .HasColumnType("int"); + + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); + + b.Property("LeaseExpiresAt") + .HasColumnType("datetime(6)"); + + b.Property("ProcessingAttempts") + .HasColumnType("int"); + + b.Property("ProcessingToken") + .HasColumnType("char(36)"); + + b.Property("PublishAttempts") + .HasColumnType("int"); + + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); + + b.Property("State") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("LeaseExpiresAt"); + + b.HasIndex("JobKind", "JobId") + .IsUnique(); + + b.HasIndex("State", "CompletedAt"); + + b.HasIndex("State", "CreatedAt"); + + b.ToTable("BackgroundJobOutboxMessages"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginInstallation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ChangedByUserId") + .HasMaxLength(450) + .HasColumnType("varchar(450)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("InstalledVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("varchar(32)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PluginId") + .IsUnique(); + + b.ToTable("PluginInstallations"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginMigrationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("AppliedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("MigrationId") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); + + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("PluginId", "MigrationId") + .IsUnique(); + + b.ToTable("PluginMigrationHistory"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginPackageRelease", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("ActivationRequestedAt") + .HasColumnType("datetime(6)"); + + b.Property("Category") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("CreatedByUserId") + .HasMaxLength(450) + .HasColumnType("varchar(450)"); + + b.Property("Description") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("FailureMessage") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); + + b.Property("HostApiVersion") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("ManifestJson") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(160) + .HasColumnType("varchar(160)"); + + b.Property("PackageContent") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("PublisherId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Sha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("Signature") + .IsRequired() + .HasColumnType("longblob"); + + b.Property("Status") + .HasColumnType("int"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.Property("Version") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); + + b.HasKey("Id"); + + b.HasIndex("PluginId", "Status"); + + b.HasIndex("PluginId", "Version") + .IsUnique(); + + b.ToTable("PluginPackageReleases"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.System.SystemFeatureSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); + + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); + + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.HasIndex("Key") + .IsUnique(); + + b.ToTable("SystemFeatureSettings"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetRoleClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClaimType") + .HasColumnType("longtext"); + + b.Property("ClaimValue") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserClaims"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); + + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("char(36)"); + + b.HasKey("LoginProvider", "ProviderKey"); + + b.HasIndex("UserId"); + + b.ToTable("AspNetUserLogins"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("RoleId") + .HasColumnType("char(36)"); + + b.HasKey("UserId", "RoleId"); + + b.HasIndex("RoleId"); + + b.ToTable("AspNetUserRoles"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); + + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Value") + .HasColumnType("longtext"); + + b.HasKey("UserId", "LoginProvider", "Name"); + + b.ToTable("AspNetUserTokens"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedCounselorUser") + .WithMany() + .HasForeignKey("AssignedCounselorUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.WarningRecord", "WarningRecord") + .WithOne("RiskCase") + .HasForeignKey("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "WarningRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AssignedCounselorUser"); + + b.Navigation("Student"); + + b.Navigation("WarningRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "AcademicRiskCase") + .WithMany("Entries") + .HasForeignKey("AcademicRiskCaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "RecordedByUser") + .WithMany() + .HasForeignKey("RecordedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicRiskCase"); + + b.Navigation("RecordedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CounselorUser") + .WithMany() + .HasForeignKey("CounselorUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CounselorUser"); + + b.Navigation("Major"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") + .WithMany("CheckInAttempts") + .HasForeignKey("AttendanceSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AttendanceSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") + .WithMany("Records") + .HasForeignKey("AttendanceSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AttendanceSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("RequestedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany() + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SchedulePlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", "Application") + .WithOne("PaymentOrder") + .HasForeignKey("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ConfirmedByUser") + .WithMany() + .HasForeignKey("ConfirmedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Application"); + + b.Navigation("ConfirmedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", "Project") + .WithMany("Applications") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Project"); + + b.Navigation("ReviewedByUser"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "OperatedByUser") + .WithMany() + .HasForeignKey("OperatedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "PaymentOrder") + .WithMany() + .HasForeignKey("PaymentOrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.CampusWalletAccount", "WalletAccount") + .WithMany("Transactions") + .HasForeignKey("WalletAccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperatedByUser"); + + b.Navigation("PaymentOrder"); + + b.Navigation("WalletAccount"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "Building") + .WithMany() + .HasForeignKey("BuildingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Building"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedByUser") + .WithMany() + .HasForeignKey("AssignedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedToUser") + .WithMany() + .HasForeignKey("AssignedToUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ClassroomEquipment", "ClassroomEquipment") + .WithMany() + .HasForeignKey("ClassroomEquipmentId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReporterUser") + .WithMany() + .HasForeignKey("ReporterUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AssignedByUser"); + + b.Navigation("AssignedToUser"); + + b.Navigation("Classroom"); + + b.Navigation("ClassroomEquipment"); + + b.Navigation("ReporterUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.College", "ApplicantCollege") + .WithMany() + .HasForeignKey("ApplicantCollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ApplicantUser") + .WithMany() + .HasForeignKey("ApplicantUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AcademicTerm"); + + b.Navigation("ApplicantCollege"); + + b.Navigation("ApplicantUser"); + + b.Navigation("Classroom"); + + b.Navigation("ReviewedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", "ResultDetail") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentResultDetailId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("ResultDetail"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Declarations") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", "Rule") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Dimension"); + + b.Navigation("Rule"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany("Dimensions") + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("DimensionLocks") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); + + b.Navigation("Batch"); + + b.Navigation("Dimension"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", "DimensionLock") + .WithMany("Snapshots") + .HasForeignKey("ComprehensiveAssessmentDimensionLockId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DimensionLock"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("LiveResults") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", "Result") + .WithMany("Details") + .HasForeignKey("ComprehensiveAssessmentLiveResultId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); + + b.Navigation("Dimension"); + + b.Navigation("Result"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Publications") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "PublishedByUser") + .WithMany() + .HasForeignKey("PublishedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("PublishedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Results") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", "Result") + .WithMany("Details") + .HasForeignKey("ComprehensiveAssessmentResultId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); + + b.Navigation("Dimension"); + + b.Navigation("Result"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany("Rules") + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dimension"); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("ScheduleNodes") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Batch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.CourseCategory", "CourseCategory") + .WithMany() + .HasForeignKey("CourseCategoryId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("College"); + + b.Navigation("CourseCategory"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "SubstituteTeacher") + .WithMany() + .HasForeignKey("SubstituteTeacherId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("SubstituteTeacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", "CourseSelectionOffering") + .WithMany("Enrollments") + .HasForeignKey("CourseSelectionOfferingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseSelectionOffering"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") + .WithMany() + .HasForeignKey("OriginalCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") + .WithMany() + .HasForeignKey("SubstituteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Major"); + + b.Navigation("OriginalCourse"); + + b.Navigation("SubstituteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) + .WithMany() + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseGroup", "CourseGroup") + .WithMany("Courses") + .HasForeignKey("CourseGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("CourseGroup"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany("Prerequisites") + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "PrerequisiteCourse") + .WithMany("RequiredByCourses") + .HasForeignKey("PrerequisiteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("PrerequisiteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") + .WithMany("Offerings") + .HasForeignKey("CourseSelectionRoundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseSelectionRound"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") + .WithMany("EligibleGrades") + .HasForeignKey("CourseSelectionRoundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CourseSelectionRound"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", "CourseEquivalencyRule") + .WithMany() + .HasForeignKey("CourseEquivalencyRuleId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") + .WithMany() + .HasForeignKey("OriginalCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") + .WithMany() + .HasForeignKey("SubstituteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseEquivalencyRule"); + + b.Navigation("OriginalCourse"); + + b.Navigation("Student"); + + b.Navigation("SubstituteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumModule", "CurriculumModule") + .WithMany("Courses") + .HasForeignKey("CurriculumModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("CurriculumModule"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") + .WithMany("Modules") + .HasForeignKey("CurriculumPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CurriculumPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Major"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", null) + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", "DegreeAwardBatch") + .WithMany("Results") + .HasForeignKey("DegreeAwardBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditResult", "GraduationAuditResult") + .WithMany() + .HasForeignKey("GraduationAuditResultId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DegreeAwardBatch"); + + b.Navigation("GraduationAuditResult"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "PreferredBuilding") + .WithMany() + .HasForeignKey("PreferredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "PreferredRoom") + .WithMany() + .HasForeignKey("PreferredRoomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PreferredBuilding"); + + b.Navigation("PreferredRoom"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") + .WithMany("Beds") + .HasForeignKey("DormitoryRoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DormitoryRoom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") + .WithMany() + .HasForeignKey("DormitoryHygieneBatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") + .WithMany("SelectedBatches") + .HasForeignKey("DormitoryHygieneCalculationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DormitoryHygieneBatch"); + + b.Navigation("DormitoryHygieneCalculation"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") + .WithMany("Scores") + .HasForeignKey("DormitoryHygieneBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") + .WithMany("HygieneScores") + .HasForeignKey("DormitoryRoomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryHygieneBatch"); + + b.Navigation("DormitoryRoom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") + .WithMany("Results") + .HasForeignKey("DormitoryHygieneCalculationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("DormitoryHygieneCalculation"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "DormitoryBed") + .WithOne("Occupancy") + .HasForeignKey("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", "DormitoryBedId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryBed"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "DormitoryBuilding") + .WithMany("Rooms") + .HasForeignKey("DormitoryBuildingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryBuilding"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", "DormitoryAllocationBatch") + .WithMany() + .HasForeignKey("DormitoryAllocationBatchId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "FromBed") + .WithMany() + .HasForeignKey("FromBedId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "ToBed") + .WithMany() + .HasForeignKey("ToBedId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("DormitoryAllocationBatch"); + + b.Navigation("FromBed"); + + b.Navigation("Student"); + + b.Navigation("ToBed"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") + .WithMany("Dimensions") + .HasForeignKey("EvaluationSetupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationSetup"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") + .WithMany("Records") + .HasForeignKey("EvaluationSetupId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("EvaluationSetup"); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationDimension", "EvaluationDimension") + .WithMany("Scores") + .HasForeignKey("EvaluationDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationRecord", "EvaluationRecord") + .WithMany("Scores") + .HasForeignKey("EvaluationRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationDimension"); + + b.Navigation("EvaluationRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + 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") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExamPlan", "ExamPlan") + .WithMany("Sessions") + .HasForeignKey("ExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ExamPlan"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExamSession", "ExamSession") + .WithMany("Invigilators") + .HasForeignKey("ExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExamSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithMany("Bookings") + .HasForeignKey("ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany("Bookings") + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentProject"); + + b.Navigation("ExperimentSession"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") + .WithMany("Items") + .HasForeignKey("ExperimentGradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentGradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", "ExperimentGradeItem") + .WithMany("Scores") + .HasForeignKey("ExperimentGradeItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", "ExperimentGradeRecord") + .WithMany("ItemScores") + .HasForeignKey("ExperimentGradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentGradeItem"); + + b.Navigation("ExperimentGradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") + .WithMany("Records") + .HasForeignKey("ExperimentGradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany() + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentGradeSheet"); + + b.Navigation("ExperimentSession"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithOne("GradeSheet") + .HasForeignKey("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentProject"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") + .WithMany() + .HasForeignKey("ScheduleEntryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ScheduleEntry"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithMany("Sessions") + .HasForeignKey("ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ExperimentProject"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany("Instructors") + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("AuthorUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) + .WithMany() + .HasForeignKey("ParentCommentId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) + .WithMany() + .HasForeignKey("CommentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeModification", "GradeModification") + .WithOne("GradeAppeal") + .HasForeignKey("Jiaowu.Api.Domain.Academic.GradeAppeal", "GradeModificationId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany() + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeModification"); + + b.Navigation("GradeRecord"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("Items") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeItem", "GradeItem") + .WithMany("Scores") + .HasForeignKey("GradeItemId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("ItemScores") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeItem"); + + b.Navigation("GradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany() + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("Records") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("ScoreSubmissions") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") + .WithMany("ScoreSubmissions") + .HasForeignKey("GradeSubmissionBatchId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("GradeRecord"); + + b.Navigation("GradeSubmissionBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("SubmissionBatches") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("SubmissionBatches") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") + .WithMany("Records") + .HasForeignKey("GradeSubmissionBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeRecord"); + + b.Navigation("GradeSubmissionBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") + .WithMany() + .HasForeignKey("CurriculumPlanId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", "GraduationAuditBatch") + .WithMany("Results") + .HasForeignKey("GraduationAuditBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CurriculumPlan"); + + b.Navigation("GraduationAuditBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", "GraduationClearanceBatch") + .WithMany("Items") + .HasForeignKey("GraduationClearanceBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GraduationClearanceBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", "GraduationClearanceItem") + .WithMany("Records") + .HasForeignKey("GraduationClearanceItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GraduationClearanceItem"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") + .WithMany() + .HasForeignKey("MakeupExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MakeupExamPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") + .WithMany("Enrollments") + .HasForeignKey("MakeupExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DeferredExam", "SourceDeferredExam") + .WithMany() + .HasForeignKey("SourceDeferredExamId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "SourceGradeRecord") + .WithMany() + .HasForeignKey("SourceGradeRecordId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MakeupExamSession"); + + b.Navigation("SourceDeferredExam"); + + b.Navigation("SourceGradeRecord"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") + .WithMany("Sessions") + .HasForeignKey("MakeupExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("MakeupExamPlan"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") + .WithMany("Invigilators") + .HasForeignKey("MakeupExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MakeupExamSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MessageDispatch", "MessageDispatch") + .WithMany("Notifications") + .HasForeignKey("MessageDispatchId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("MessageDispatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Notification", "Notification") + .WithMany("Deliveries") + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.WebPushSubscription", "WebPushSubscription") + .WithMany("Deliveries") + .HasForeignKey("WebPushSubscriptionId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Notification"); + + b.Navigation("WebPushSubscription"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "InvalidatedByUser") + .WithMany() + .HasForeignKey("InvalidatedByUserId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "IssuedByUser") + .WithMany() + .HasForeignKey("IssuedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "ReissuedFromDocument") + .WithMany() + .HasForeignKey("ReissuedFromDocumentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("InvalidatedByUser"); + + b.Navigation("IssuedByUser"); + + b.Navigation("ReissuedFromDocument"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "DownloadedByUser") + .WithMany() + .HasForeignKey("DownloadedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "OfficialDocument") + .WithMany("Downloads") + .HasForeignKey("OfficialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DownloadedByUser"); + + b.Navigation("OfficialDocument"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.OtherExamBatch", "OtherExamBatch") + .WithMany("Results") + .HasForeignKey("OtherExamBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OtherExamBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", "PhysicalTestRecord") + .WithMany("Items") + .HasForeignKey("PhysicalTestRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PhysicalTestRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", "PhysicalTestBatch") + .WithMany("Records") + .HasForeignKey("PhysicalTestBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhysicalTestBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") + .WithMany() + .HasForeignKey("ScheduleEntryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ScheduleEntry"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany("Entries") + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("SchedulePlan"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("RequestedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany() + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SchedulePlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") + .WithMany("Students") + .HasForeignKey("AdministrativeClassId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AdministrativeClass"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentLeave", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "EnlistmentChange") + .WithMany() + .HasForeignKey("EnlistmentChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("EnlistmentChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AffectedTerm") + .WithMany() + .HasForeignKey("AffectedTermId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "OriginalClass") + .WithMany() + .HasForeignKey("OriginalClassId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "TargetClass") + .WithMany() + .HasForeignKey("TargetClassId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AffectedTerm"); + + b.Navigation("OriginalClass"); + + b.Navigation("Student"); + + b.Navigation("TargetClass"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentBooking", null) + .WithMany() + .HasForeignKey("ExperimentBookingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", null) + .WithMany() + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) + .WithMany() + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("College"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Course"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Teacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", "TeachingImprovementPlan") + .WithMany("Reviews") + .HasForeignKey("TeachingImprovementPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingImprovementPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Course"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") + .WithMany("AllowedClassrooms") + .HasForeignKey("TeachingTaskScheduleConstraintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("TeachingTaskScheduleConstraint"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") + .WithMany("AllowedExperimentClassrooms") + .HasForeignKey("TeachingTaskScheduleConstraintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("TeachingTaskScheduleConstraint"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") + .WithMany() + .HasForeignKey("AdministrativeClassId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany("Classes") + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AdministrativeClass"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskGradeStatistic") + .WithMany("ScoreBands") + .HasForeignKey("TeachingTaskGradeStatisticId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingTaskGradeStatistic"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "ExperimentRequiredBuilding") + .WithMany() + .HasForeignKey("ExperimentRequiredBuildingId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "ExperimentRequiredCampus") + .WithMany() + .HasForeignKey("ExperimentRequiredCampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "RequiredCampus") + .WithMany() + .HasForeignKey("RequiredCampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentRequiredBuilding"); + + b.Navigation("ExperimentRequiredCampus"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("RequiredCampus"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany("Teachers") + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Teacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TuitionBill", "TuitionBill") + .WithMany("Payments") + .HasForeignKey("TuitionBillId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TuitionBill"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Identity.UserNavigationPreference", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.Navigation("Students"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.Navigation("CheckInAttempts"); + + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.Navigation("PaymentOrder"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.Navigation("Applications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.Navigation("Declarations"); + + b.Navigation("DimensionLocks"); + + b.Navigation("LiveResults"); + + b.Navigation("Publications"); + + b.Navigation("Results"); + + b.Navigation("ScheduleNodes"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.Navigation("Snapshots"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.Navigation("Dimensions"); + + b.Navigation("Rules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.Navigation("Prerequisites"); + + b.Navigation("RequiredByCourses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => + { + b.Navigation("Courses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.Navigation("Enrollments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.Navigation("EligibleGrades"); + + b.Navigation("Offerings"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.Navigation("Courses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.Navigation("Modules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => + { + b.Navigation("Results"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.Navigation("Occupancy"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.Navigation("Rooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.Navigation("Results"); + + b.Navigation("SelectedBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.Navigation("Beds"); + + b.Navigation("HygieneScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.Navigation("Dimensions"); + + b.Navigation("Records"); + }); + + 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.ExperimentGradeItem", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.Navigation("ItemScores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.Navigation("Items"); + + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.Navigation("Bookings"); + + b.Navigation("GradeSheet"); + + b.Navigation("Sessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.Navigation("Bookings"); + + b.Navigation("Instructors"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.Navigation("GradeAppeal"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.Navigation("ItemScores"); + + b.Navigation("ScoreSubmissions"); + + b.Navigation("SubmissionBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.Navigation("Items"); + + b.Navigation("Records"); + + b.Navigation("SubmissionBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.Navigation("Records"); + + b.Navigation("ScoreSubmissions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => + { + b.Navigation("Results"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.Navigation("Sessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.Navigation("Enrollments"); + + b.Navigation("Invigilators"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => + { + b.Navigation("Notifications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.Navigation("Deliveries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.Navigation("Downloads"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => + { + b.Navigation("Results"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.Navigation("Reviews"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.Navigation("Classes"); + + b.Navigation("Teachers"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.Navigation("ScoreBands"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.Navigation("AllowedClassrooms"); + + b.Navigation("AllowedExperimentClassrooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.Navigation("Payments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.Navigation("RiskCase"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.Navigation("Deliveries"); + }); +#pragma warning restore 612, 618 + } +} diff --git a/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.cs b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.cs new file mode 100644 index 0000000..4efeb14 --- /dev/null +++ b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/20261114070002_StudentLeave.cs @@ -0,0 +1,60 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql; + +/// +public partial class _20261114070002_StudentLeave : Migration +{ + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "StudentLeaves", + columns: table => new + { + Id = table.Column(type: "char(36)", nullable: false), + StudentId = table.Column(type: "char(36)", nullable: false), + Type = table.Column(type: "int", nullable: false), + StartAt = table.Column(type: "datetime(6)", nullable: false), + EndAt = table.Column(type: "datetime(6)", nullable: false), + Reason = table.Column(type: "varchar(500)", maxLength: 500, nullable: false), + Status = table.Column(type: "int", nullable: false), + ReviewComment = table.Column(type: "varchar(500)", maxLength: 500, nullable: true), + ReviewedByUserId = table.Column(type: "char(36)", nullable: true), + ReviewedAt = table.Column(type: "datetime(6)", nullable: true), + CreatedAt = table.Column(type: "datetime(6)", nullable: false), + UpdatedAt = table.Column(type: "datetime(6)", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_StudentLeaves", x => x.Id); + table.ForeignKey( + name: "FK_StudentLeaves_Students_StudentId", + column: x => x.StudentId, + principalTable: "Students", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }) + .Annotation("MySQL:Charset", "utf8mb4"); + + migrationBuilder.CreateIndex( + name: "IX_StudentLeaves_Status_CreatedAt", + table: "StudentLeaves", + columns: new[] { "Status", "CreatedAt" }); + + migrationBuilder.CreateIndex( + name: "IX_StudentLeaves_StudentId_CreatedAt", + table: "StudentLeaves", + columns: new[] { "StudentId", "CreatedAt" }); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "StudentLeaves"); + } +} diff --git a/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/AppDbContextModelSnapshot.cs b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/AppDbContextModelSnapshot.cs index 8b77efc..f551c57 100644 --- a/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/AppDbContextModelSnapshot.cs +++ b/src/Jiaowu.Api/Infrastructure/Persistence/Migrations/MySql/AppDbContextModelSnapshot.cs @@ -1,4 +1,4 @@ -// +// using System; using Jiaowu.Api.Infrastructure.Persistence; using Microsoft.EntityFrameworkCore; @@ -7,12274 +7,12340 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable -namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql +namespace Jiaowu.Api.Infrastructure.Persistence.Migrations.MySql; + +[DbContext(typeof(AppDbContext))] +partial class AppDbContextModelSnapshot : ModelSnapshot { - [DbContext(typeof(AppDbContext))] - partial class AppDbContextModelSnapshot : ModelSnapshot + // If you encounter a merge conflict in the line below, it means you need to + // discard one of the migration branches and recreate its migrations on top of + // the other branch. See https://aka.ms/efcore-docs-migrations-conflicts for more info. + public override string LastMigrationId => "20261114070002_StudentLeave"; + + protected override void BuildModel(ModelBuilder modelBuilder) { - protected override void BuildModel(ModelBuilder modelBuilder) - { #pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "10.0.13") - .HasAnnotation("Relational:MaxIdentifierLength", 64); + modelBuilder + .HasAnnotation("ProductVersion", "11.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("AudienceRoles") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("AudienceRoles") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EndsOn") - .HasColumnType("date"); + b.Property("EndsOn") + .HasColumnType("date"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("IsOffDay") - .HasColumnType("tinyint(1)"); + b.Property("IsOffDay") + .HasColumnType("tinyint(1)"); - b.Property("Kind") - .HasColumnType("int"); + b.Property("Kind") + .HasColumnType("int"); - b.Property("ReminderDays") - .HasColumnType("int"); + b.Property("ReminderDays") + .HasColumnType("int"); - b.Property("Source") - .HasColumnType("int"); + b.Property("Source") + .HasColumnType("int"); - b.Property("SourceYear") - .HasColumnType("int"); + b.Property("SourceYear") + .HasColumnType("int"); - b.Property("StartsOn") - .HasColumnType("date"); + b.Property("StartsOn") + .HasColumnType("date"); - b.Property("Title") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Title") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "StartsOn"); + b.HasIndex("AcademicTermId", "StartsOn"); - b.HasIndex("IsEnabled", "StartsOn"); + b.HasIndex("IsEnabled", "StartsOn"); - b.HasIndex("AcademicTermId", "Source", "SourceYear", "StartsOn"); + b.HasIndex("AcademicTermId", "Source", "SourceYear", "StartsOn"); - b.ToTable("AcademicCalendarEvents"); - }); + b.ToTable("AcademicCalendarEvents"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AssignedCounselorUserId") - .HasColumnType("char(36)"); + b.Property("AssignedCounselorUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("FollowUpDueDate") - .HasColumnType("date"); + b.Property("FollowUpDueDate") + .HasColumnType("date"); - b.Property("ReviewDate") - .HasColumnType("date"); + b.Property("ReviewDate") + .HasColumnType("date"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TaskCompletedAt") - .HasColumnType("datetime(6)"); + b.Property("TaskCompletedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WarningRecordId") - .HasColumnType("char(36)"); + b.Property("WarningRecordId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("WarningRecordId") - .IsUnique(); + b.HasIndex("WarningRecordId") + .IsUnique(); - b.HasIndex("StudentId", "Status"); + b.HasIndex("StudentId", "Status"); - b.HasIndex("AssignedCounselorUserId", "Status", "FollowUpDueDate"); + b.HasIndex("AssignedCounselorUserId", "Status", "FollowUpDueDate"); - b.ToTable("AcademicRiskCases"); - }); + b.ToTable("AcademicRiskCases"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicRiskCaseId") - .HasColumnType("char(36)"); + b.Property("AcademicRiskCaseId") + .HasColumnType("char(36)"); - b.Property("Content") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("Content") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("OccurredAt") - .HasColumnType("datetime(6)"); + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); - b.Property("RecordedByUserId") - .HasColumnType("char(36)"); + b.Property("RecordedByUserId") + .HasColumnType("char(36)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RecordedByUserId"); + b.HasIndex("RecordedByUserId"); - b.HasIndex("AcademicRiskCaseId", "OccurredAt"); + b.HasIndex("AcademicRiskCaseId", "OccurredAt"); - b.ToTable("AcademicRiskCaseEntries"); - }); + b.ToTable("AcademicRiskCaseEntries"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicTerm", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicTerm", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicYear") - .IsRequired() - .HasColumnType("longtext"); + b.Property("AcademicYear") + .IsRequired() + .HasColumnType("longtext"); - b.Property("ArchiveReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndDate") - .HasColumnType("date"); + b.Property("EndDate") + .HasColumnType("date"); - b.Property("IsArchived") - .IsConcurrencyToken() - .HasColumnType("tinyint(1)"); + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); - b.Property("IsCurrent") - .HasColumnType("tinyint(1)"); + b.Property("IsCurrent") + .HasColumnType("tinyint(1)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Season") - .HasColumnType("int"); + b.Property("Season") + .HasColumnType("int"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("StartDate") - .HasColumnType("date"); + b.Property("StartDate") + .HasColumnType("date"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsArchived"); + b.HasIndex("IsArchived"); - b.HasIndex("IsCurrent"); + b.HasIndex("IsCurrent"); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("AcademicTerms"); - }); + b.ToTable("AcademicTerms"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CounselorName") - .HasColumnType("longtext"); + b.Property("CounselorName") + .HasColumnType("longtext"); - b.Property("CounselorUserId") - .HasColumnType("char(36)"); + b.Property("CounselorUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Grade") - .HasColumnType("int"); + b.Property("Grade") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("MajorId") - .HasColumnType("char(36)"); + b.Property("MajorId") + .HasColumnType("char(36)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("CounselorUserId"); + b.HasIndex("CounselorUserId"); - b.HasIndex("MajorId"); + b.HasIndex("MajorId"); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("AdministrativeClasses"); - }); + b.ToTable("AdministrativeClasses"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ApprovalRouteSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ApprovalRouteSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewerRole") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("ReviewerRole") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("Type") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Type") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Type") - .IsUnique(); + b.HasIndex("Type") + .IsUnique(); - b.ToTable("ApprovalRouteSettings"); - }); + b.ToTable("ApprovalRouteSettings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ArchiveEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ArchiveEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ActorName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.Property("ActorName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("ActorUserId") - .HasColumnType("char(36)"); + b.Property("ActorUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EntityId") - .HasColumnType("char(36)"); + b.Property("EntityId") + .HasColumnType("char(36)"); - b.Property("IsArchived") - .HasColumnType("tinyint(1)"); + b.Property("IsArchived") + .HasColumnType("tinyint(1)"); - b.Property("Kind") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("Kind") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Kind", "EntityId", "CreatedAt"); + b.HasIndex("Kind", "EntityId", "CreatedAt"); - b.ToTable("ArchiveEvents"); - }); + b.ToTable("ArchiveEvents"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AccuracyMeters") - .HasColumnType("double"); + b.Property("AccuracyMeters") + .HasColumnType("double"); - b.Property("AttendanceSheetId") - .HasColumnType("char(36)"); + b.Property("AttendanceSheetId") + .HasColumnType("char(36)"); - b.Property("CheckInMethod") - .HasColumnType("int"); + b.Property("CheckInMethod") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DeviceIdentifierHash") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("DeviceIdentifierHash") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("DevicePlatform") - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("DevicePlatform") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("DistanceMeters") - .HasColumnType("double"); + b.Property("DistanceMeters") + .HasColumnType("double"); - b.Property("FailureCode") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("FailureCode") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("IpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("IsSuccessful") - .HasColumnType("tinyint(1)"); + b.Property("IsSuccessful") + .HasColumnType("tinyint(1)"); - b.Property("Latitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("Latitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("Longitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("Longitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("RiskFlags") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("RiskFlags") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserAgent") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("DeviceIdentifierHash", "CreatedAt"); + b.HasIndex("DeviceIdentifierHash", "CreatedAt"); - b.HasIndex("IpAddress", "CreatedAt"); + b.HasIndex("IpAddress", "CreatedAt"); - b.HasIndex("AttendanceSheetId", "StudentId", "CreatedAt"); + b.HasIndex("AttendanceSheetId", "StudentId", "CreatedAt"); - b.ToTable("AttendanceCheckInAttempts"); - }); + b.ToTable("AttendanceCheckInAttempts"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => - { - b.Property("AttendanceSheetId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => + { + b.Property("AttendanceSheetId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("AppealReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("AppealReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("AppealReviewComment") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("AppealReviewComment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("AppealReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("AppealReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("AppealStatus") - .HasColumnType("int"); + b.Property("AppealStatus") + .HasColumnType("int"); - b.Property("AppealSubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("AppealSubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("CheckInAccuracyMeters") - .HasColumnType("double"); + b.Property("CheckInAccuracyMeters") + .HasColumnType("double"); - b.Property("CheckInAt") - .HasColumnType("datetime(6)"); + b.Property("CheckInAt") + .HasColumnType("datetime(6)"); - b.Property("CheckInDistanceMeters") - .HasColumnType("double"); + b.Property("CheckInDistanceMeters") + .HasColumnType("double"); - b.Property("CheckInLatitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("CheckInLatitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("CheckInLongitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("CheckInLongitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("CheckedInMethod") - .HasColumnType("int"); + b.Property("CheckedInMethod") + .HasColumnType("int"); - b.Property("Notes") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("Notes") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.HasKey("AttendanceSheetId", "StudentId"); + b.HasKey("AttendanceSheetId", "StudentId"); - b.HasIndex("AppealStatus"); + b.HasIndex("AppealStatus"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.ToTable("AttendanceRecords"); - }); + b.ToTable("AttendanceRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AttendanceDate") - .HasColumnType("datetime(6)"); + b.Property("AttendanceDate") + .HasColumnType("datetime(6)"); - b.Property("CheckInEndsAt") - .HasColumnType("datetime(6)"); + b.Property("CheckInEndsAt") + .HasColumnType("datetime(6)"); - b.Property("CheckInMethod") - .HasColumnType("int"); + b.Property("CheckInMethod") + .HasColumnType("int"); - b.Property("CheckInStartsAt") - .HasColumnType("datetime(6)"); + b.Property("CheckInStartsAt") + .HasColumnType("datetime(6)"); - b.Property("CheckInToken") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("CheckInToken") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("LocationRadiusMeters") - .HasColumnType("int"); + b.Property("LocationRadiusMeters") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TargetLatitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("TargetLatitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("TargetLongitude") - .HasPrecision(10, 7) - .HasColumnType("decimal(10,7)"); + b.Property("TargetLongitude") + .HasPrecision(10, 7) + .HasColumnType("decimal(10,7)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CheckInToken") - .IsUnique(); + b.HasIndex("CheckInToken") + .IsUnique(); - b.HasIndex("TeachingTaskId", "AttendanceDate"); + b.HasIndex("TeachingTaskId", "AttendanceDate"); - b.ToTable("AttendanceSheets"); - }); + b.ToTable("AttendanceSheets"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ActiveSchedulePlanId") - .HasColumnType("char(36)"); + b.Property("ActiveSchedulePlanId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CompletedTasks") - .HasColumnType("int"); + b.Property("CompletedTasks") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedEntries") - .HasColumnType("int"); + b.Property("CreatedEntries") + .HasColumnType("int"); - b.Property("CurrentGeneration") - .HasColumnType("int"); + b.Property("CurrentGeneration") + .HasColumnType("int"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("MessagesJson") - .HasColumnType("longtext"); + b.Property("MessagesJson") + .HasColumnType("longtext"); - b.Property("ProcessedTasks") - .HasColumnType("int"); + b.Property("ProcessedTasks") + .HasColumnType("int"); - b.Property("RequestedByUserId") - .HasColumnType("char(36)"); + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); - b.Property("SchedulePlanId") - .HasColumnType("char(36)"); + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TotalGenerations") - .HasColumnType("int"); + b.Property("TotalGenerations") + .HasColumnType("int"); - b.Property("TotalTasks") - .HasColumnType("int"); + b.Property("TotalTasks") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ActiveSchedulePlanId") - .IsUnique(); + b.HasIndex("ActiveSchedulePlanId") + .IsUnique(); - b.HasIndex("RequestedByUserId"); + b.HasIndex("RequestedByUserId"); - b.HasIndex("SchedulePlanId", "CreatedAt"); + b.HasIndex("SchedulePlanId", "CreatedAt"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("AutomaticScheduleJobs"); - }); + b.ToTable("AutomaticScheduleJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CampusId") - .HasColumnType("char(36)"); + b.Property("CampusId") + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CampusId"); + b.HasIndex("CampusId"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Buildings"); - }); + b.ToTable("Buildings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Campus", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Campus", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Address") - .HasColumnType("longtext"); + b.Property("Address") + .HasColumnType("longtext"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Campuses"); - }); + b.ToTable("Campuses"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Amount") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("ApplicationId") - .HasColumnType("char(36)"); + b.Property("ApplicationId") + .HasColumnType("char(36)"); - b.Property("ConfirmedAt") - .HasColumnType("datetime(6)"); + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); - b.Property("ConfirmedByUserId") - .HasColumnType("char(36)"); + b.Property("ConfirmedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Note") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("OrderNumber") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("OrderNumber") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("PaymentMethod") - .HasColumnType("int"); + b.Property("PaymentMethod") + .HasColumnType("int"); - b.Property("ReferenceNumber") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("ReferenceNumber") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ApplicationId") - .IsUnique(); + b.HasIndex("ApplicationId") + .IsUnique(); - b.HasIndex("ConfirmedByUserId"); + b.HasIndex("ConfirmedByUserId"); - b.HasIndex("OrderNumber") - .IsUnique(); + b.HasIndex("OrderNumber") + .IsUnique(); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("CampusPaymentOrders"); - }); + b.ToTable("CampusPaymentOrders"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ApplicantNote") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("ApplicantNote") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("CancelledAt") - .HasColumnType("datetime(6)"); + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); - b.Property("ConfirmedAt") - .HasColumnType("datetime(6)"); + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ProjectId") - .HasColumnType("char(36)"); + b.Property("ProjectId") + .HasColumnType("char(36)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ReviewedByUserId"); + b.HasIndex("ReviewedByUserId"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ProjectId", "StudentId") - .IsUnique(); + b.HasIndex("ProjectId", "StudentId") + .IsUnique(); - b.HasIndex("ProjectId", "Status", "CreatedAt"); + b.HasIndex("ProjectId", "Status", "CreatedAt"); - b.ToTable("CampusRegistrationApplications"); - }); + b.ToTable("CampusRegistrationApplications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Capacity") - .HasColumnType("int"); + b.Property("Capacity") + .HasColumnType("int"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("ContactName") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("ContactName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("ContactPhone") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("ContactPhone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("Description") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("Description") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("FeeAmount") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("FeeAmount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("RegistrationEndsAt") - .HasColumnType("datetime(6)"); + b.Property("RegistrationEndsAt") + .HasColumnType("datetime(6)"); - b.Property("RegistrationStartsAt") - .HasColumnType("datetime(6)"); + b.Property("RegistrationStartsAt") + .HasColumnType("datetime(6)"); - b.Property("RequiresReview") - .HasColumnType("tinyint(1)"); + b.Property("RequiresReview") + .HasColumnType("tinyint(1)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("CreatedByUserId"); + b.HasIndex("CreatedByUserId"); - b.HasIndex("CollegeId", "Status", "RegistrationEndsAt"); + b.HasIndex("CollegeId", "Status", "RegistrationEndsAt"); - b.ToTable("CampusRegistrationProjects"); - }); + b.ToTable("CampusRegistrationProjects"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Balance") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("Balance") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId") - .IsUnique(); + b.HasIndex("StudentId") + .IsUnique(); - b.ToTable("CampusWalletAccounts"); - }); + b.ToTable("CampusWalletAccounts"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Amount") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("BalanceAfter") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("BalanceAfter") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("OperatedByUserId") - .HasColumnType("char(36)"); + b.Property("OperatedByUserId") + .HasColumnType("char(36)"); - b.Property("PaymentOrderId") - .HasColumnType("char(36)"); + b.Property("PaymentOrderId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WalletAccountId") - .HasColumnType("char(36)"); + b.Property("WalletAccountId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("OperatedByUserId"); + b.HasIndex("OperatedByUserId"); - b.HasIndex("PaymentOrderId") - .IsUnique(); + b.HasIndex("PaymentOrderId") + .IsUnique(); - b.HasIndex("WalletAccountId", "CreatedAt"); + b.HasIndex("WalletAccountId", "CreatedAt"); - b.ToTable("CampusWalletTransactions"); - }); + b.ToTable("CampusWalletTransactions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AvailabilityStatus") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("AvailabilityStatus") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("BuildingId") - .HasColumnType("char(36)"); + b.Property("BuildingId") + .HasColumnType("char(36)"); - b.Property("Capacity") - .HasColumnType("int"); + b.Property("Capacity") + .HasColumnType("int"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Equipment") - .HasColumnType("longtext"); + b.Property("Equipment") + .HasColumnType("longtext"); - b.Property("Floor") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("Floor") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("RoomType") - .IsRequired() - .HasColumnType("longtext"); + b.Property("RoomType") + .IsRequired() + .HasColumnType("longtext"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("TeachingVenueNature") - .HasColumnType("int"); + b.Property("TeachingVenueNature") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("BuildingId"); + b.HasIndex("BuildingId"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Classrooms"); - }); + b.ToTable("Classrooms"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Category") - .HasColumnType("int"); + b.Property("Category") + .HasColumnType("int"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsAvailable") - .HasColumnType("tinyint(1)"); + b.Property("IsAvailable") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(80) - .HasColumnType("varchar(80)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId", "IsAvailable"); + b.HasIndex("ClassroomId", "IsAvailable"); - b.ToTable("ClassroomEquipment"); - }); + b.ToTable("ClassroomEquipment"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AssignedAt") - .HasColumnType("datetime(6)"); + b.Property("AssignedAt") + .HasColumnType("datetime(6)"); - b.Property("AssignedByUserId") - .HasColumnType("char(36)"); + b.Property("AssignedByUserId") + .HasColumnType("char(36)"); - b.Property("AssignedToUserId") - .HasColumnType("char(36)"); + b.Property("AssignedToUserId") + .HasColumnType("char(36)"); - b.Property("Category") - .HasColumnType("int"); + b.Property("Category") + .HasColumnType("int"); - b.Property("ClassroomEquipmentId") - .HasColumnType("char(36)"); + b.Property("ClassroomEquipmentId") + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Description") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("Description") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("EscalationTeacherNotifiedAt") - .HasColumnType("datetime(6)"); + b.Property("EscalationTeacherNotifiedAt") + .HasColumnType("datetime(6)"); - b.Property("FaultItem") - .IsRequired() - .HasMaxLength(80) - .HasColumnType("varchar(80)"); + b.Property("FaultItem") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); - b.Property("InitialTeacherNotifiedAt") - .HasColumnType("datetime(6)"); + b.Property("InitialTeacherNotifiedAt") + .HasColumnType("datetime(6)"); - b.Property("RepairResult") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("RepairResult") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("ReporterContact") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("ReporterContact") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("ReporterName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("ReporterName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("ReporterUserId") - .HasColumnType("char(36)"); + b.Property("ReporterUserId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AssignedByUserId"); + b.HasIndex("AssignedByUserId"); - b.HasIndex("AssignedToUserId"); + b.HasIndex("AssignedToUserId"); - b.HasIndex("ClassroomEquipmentId"); + b.HasIndex("ClassroomEquipmentId"); - b.HasIndex("ReporterUserId"); + b.HasIndex("ReporterUserId"); - b.HasIndex("ClassroomId", "Status"); + b.HasIndex("ClassroomId", "Status"); - b.HasIndex("Status", "EscalationTeacherNotifiedAt"); + b.HasIndex("Status", "EscalationTeacherNotifiedAt"); - b.ToTable("ClassroomRepairTickets"); - }); + b.ToTable("ClassroomRepairTickets"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("ApplicantCollegeId") - .HasColumnType("char(36)"); + b.Property("ApplicantCollegeId") + .HasColumnType("char(36)"); - b.Property("ApplicantName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("ApplicantName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("ApplicantUserId") - .HasColumnType("char(36)"); + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); - b.Property("AttendeeCount") - .HasColumnType("int"); + b.Property("AttendeeCount") + .HasColumnType("int"); - b.Property("CancelledAt") - .HasColumnType("datetime(6)"); + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("ContactPhone") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("ContactPhone") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("Purpose") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Purpose") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("ReservationDate") - .HasColumnType("date"); + b.Property("ReservationDate") + .HasColumnType("date"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId"); + b.HasIndex("AcademicTermId"); - b.HasIndex("ReviewedByUserId"); + b.HasIndex("ReviewedByUserId"); - b.HasIndex("ApplicantCollegeId", "Status", "ReservationDate"); + b.HasIndex("ApplicantCollegeId", "Status", "ReservationDate"); - b.HasIndex("ApplicantUserId", "Status", "CreatedAt"); + b.HasIndex("ApplicantUserId", "Status", "CreatedAt"); - b.HasIndex("ClassroomId", "ReservationDate", "Status", "StartPeriod"); + b.HasIndex("ClassroomId", "ReservationDate", "Status", "StartPeriod"); - b.ToTable("ClassroomReservations"); - }); + b.ToTable("ClassroomReservations"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CampusId") - .HasColumnType("char(36)"); + b.Property("CampusId") + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("ShortName") - .HasColumnType("longtext"); + b.Property("ShortName") + .HasColumnType("longtext"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CampusId"); + b.HasIndex("CampusId"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Colleges"); - }); + b.ToTable("Colleges"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentResultDetailId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentResultDetailId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentResultDetailId"); + b.HasIndex("ComprehensiveAssessmentResultDetailId"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); - b.ToTable("ComprehensiveAssessmentAppeals"); - }); + b.ToTable("ComprehensiveAssessmentAppeals"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("AcademicYear") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("AcademicYear") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CalculationError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("CalculationStatus") - .HasColumnType("int"); + b.Property("CalculationStatus") + .HasColumnType("int"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentSchemeId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("LiveCalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("LiveCalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("LiveCalculationError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("LiveCalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("LiveCalculationStatus") - .HasColumnType("int"); + b.Property("LiveCalculationStatus") + .HasColumnType("int"); - b.Property("LiveEstimationEnabled") - .HasColumnType("tinyint(1)"); + b.Property("LiveEstimationEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("PendingCalculationMode") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(2); + b.Property("PendingCalculationMode") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(2); - b.Property("PlanPublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PlanPublishedAt") + .HasColumnType("datetime(6)"); - b.Property("PublicationCount") - .HasColumnType("int"); + b.Property("PublicationCount") + .HasColumnType("int"); - b.Property("PublicityEndsAt") - .HasColumnType("datetime(6)"); + b.Property("PublicityEndsAt") + .HasColumnType("datetime(6)"); - b.Property("PublicityStartsAt") - .HasColumnType("datetime(6)"); + b.Property("PublicityStartsAt") + .HasColumnType("datetime(6)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId"); + b.HasIndex("AcademicTermId"); - b.HasIndex("CollegeId"); + b.HasIndex("CollegeId"); - b.HasIndex("ComprehensiveAssessmentSchemeId"); + b.HasIndex("ComprehensiveAssessmentSchemeId"); - b.HasIndex("CreatedByUserId"); + b.HasIndex("CreatedByUserId"); - b.HasIndex("AcademicYear", "CollegeId", "Status", "CreatedAt"); + b.HasIndex("AcademicYear", "CollegeId", "Status", "CreatedAt"); - b.HasIndex("LiveEstimationEnabled", "Status", "LiveCalculationStatus", "LiveCalculatedAt"); + b.HasIndex("LiveEstimationEnabled", "Status", "LiveCalculationStatus", "LiveCalculatedAt"); - b.ToTable("ComprehensiveAssessmentBatches"); - }); + b.ToTable("ComprehensiveAssessmentBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ApprovedScore") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("ApprovedScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("ClaimedScore") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("ClaimedScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("CollegeComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("CollegeComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("CollegeReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("CollegeReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CollegeReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("CollegeReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentDimensionId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentRuleId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentRuleId") + .HasColumnType("char(36)"); - b.Property("CounselorComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("CounselorComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("CounselorReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("CounselorReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CounselorReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("CounselorReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EvidenceDescription") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("EvidenceDescription") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EvidenceUrl") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("EvidenceUrl") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Level") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Level") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("OccurredOn") - .HasColumnType("date"); + b.Property("OccurredOn") + .HasColumnType("date"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentDimensionId"); + b.HasIndex("ComprehensiveAssessmentDimensionId"); - b.HasIndex("ComprehensiveAssessmentRuleId"); + b.HasIndex("ComprehensiveAssessmentRuleId"); - b.HasIndex("StudentId", "OccurredOn"); + b.HasIndex("StudentId", "OccurredOn"); - b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId", "Status"); - b.ToTable("ComprehensiveAssessmentDeclarations"); - }); + b.ToTable("ComprehensiveAssessmentDeclarations"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("ComprehensiveAssessmentSchemeId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsRequired") - .HasColumnType("tinyint(1)"); + b.Property("IsRequired") + .HasColumnType("tinyint(1)"); - b.Property("MaxScore") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("MaxScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SettingsJson") - .HasColumnType("text"); + b.Property("SettingsJson") + .HasColumnType("text"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("SourceType") - .HasColumnType("int"); + b.Property("SourceType") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Weight") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("Weight") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentSchemeId", "Code") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentSchemeId", "Code") + .IsUnique(); - b.ToTable("ComprehensiveAssessmentDimensions"); - }); + b.ToTable("ComprehensiveAssessmentDimensions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentDimensionId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DataCutoffAt") - .HasColumnType("datetime(6)"); + b.Property("DataCutoffAt") + .HasColumnType("datetime(6)"); - b.Property("ExemptCount") - .HasColumnType("int"); + b.Property("ExemptCount") + .HasColumnType("int"); - b.Property("LastError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("LockedAt") - .HasColumnType("datetime(6)"); + b.Property("LockedAt") + .HasColumnType("datetime(6)"); - b.Property("LockedByUserId") - .HasColumnType("char(36)"); + b.Property("LockedByUserId") + .HasColumnType("char(36)"); - b.Property("MissingCount") - .HasColumnType("int"); + b.Property("MissingCount") + .HasColumnType("int"); - b.Property("PlannedLockAt") - .HasColumnType("datetime(6)"); + b.Property("PlannedLockAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentCount") - .HasColumnType("int"); + b.Property("StudentCount") + .HasColumnType("int"); - b.Property("UnlockReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("UnlockReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .HasColumnType("int"); + b.Property("Version") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentDimensionId"); + b.HasIndex("ComprehensiveAssessmentDimensionId"); - b.HasIndex("ComprehensiveAssessmentBatchId", "ComprehensiveAssessmentDimensionId") - .IsUnique() - .HasDatabaseName("IX_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); + b.HasIndex("ComprehensiveAssessmentBatchId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); - b.HasIndex("Status", "PlannedLockAt"); + b.HasIndex("Status", "PlannedLockAt"); - b.ToTable("ComprehensiveAssessmentDimensionLocks"); - }); + b.ToTable("ComprehensiveAssessmentDimensionLocks"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentDimensionLockId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionLockId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Explanation") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("RawScore") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("RawScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("SourceSnapshotJson") - .HasColumnType("longtext"); + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); - b.Property("SourceStatus") - .HasColumnType("int"); + b.Property("SourceStatus") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .HasColumnType("int"); + b.Property("Version") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ComprehensiveAssessmentDimensionLockId", "StudentId", "Version") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentDimensionLockId", "StudentId", "Version") + .IsUnique(); - b.ToTable("ComprehensiveAssessmentDimensionSnapshots"); - }); + b.ToTable("ComprehensiveAssessmentDimensionSnapshots"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EstimatedTotalScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("EstimatedTotalScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("MissingRequiredDimensionCount") - .HasColumnType("int"); + b.Property("MissingRequiredDimensionCount") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") + .IsUnique(); - b.ToTable("ComprehensiveAssessmentLiveResults"); - }); + b.ToTable("ComprehensiveAssessmentLiveResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentDimensionId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentLiveResultId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentLiveResultId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Explanation") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("IsLocked") - .HasColumnType("tinyint(1)"); + b.Property("IsLocked") + .HasColumnType("tinyint(1)"); - b.Property("LockVersion") - .HasColumnType("int"); + b.Property("LockVersion") + .HasColumnType("int"); - b.Property("RawScore") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("RawScore") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("SourceSnapshotJson") - .HasColumnType("longtext"); + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); - b.Property("SourceStatus") - .HasColumnType("int"); + b.Property("SourceStatus") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeightedScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("WeightedScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentDimensionId"); + b.HasIndex("ComprehensiveAssessmentDimensionId"); - b.HasIndex("ComprehensiveAssessmentLiveResultId", "ComprehensiveAssessmentDimensionId") - .IsUnique() - .HasDatabaseName("IX_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); + b.HasIndex("ComprehensiveAssessmentLiveResultId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); - b.ToTable("ComprehensiveAssessmentLiveResultDetails"); - }); + b.ToTable("ComprehensiveAssessmentLiveResultDetails"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Note") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("PublishedByUserId") - .HasColumnType("char(36)"); + b.Property("PublishedByUserId") + .HasColumnType("char(36)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .HasColumnType("int"); + b.Property("Version") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PublishedByUserId"); + b.HasIndex("PublishedByUserId"); - b.HasIndex("ComprehensiveAssessmentBatchId", "Version") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentBatchId", "Version") + .IsUnique(); - b.ToTable("ComprehensiveAssessmentPublications"); - }); + b.ToTable("ComprehensiveAssessmentPublications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("ClassRank") - .HasColumnType("int"); + b.Property("ClassRank") + .HasColumnType("int"); - b.Property("CollegeRank") - .HasColumnType("int"); + b.Property("CollegeRank") + .HasColumnType("int"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("MajorRank") - .HasColumnType("int"); + b.Property("MajorRank") + .HasColumnType("int"); - b.Property("MissingRequiredDimensionCount") - .HasColumnType("int"); + b.Property("MissingRequiredDimensionCount") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TotalScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("TotalScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ComprehensiveAssessmentBatchId", "ClassRank"); + b.HasIndex("ComprehensiveAssessmentBatchId", "ClassRank"); - b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") - .IsUnique() - .HasDatabaseName("IX_ComprehensiveAssessmentResults_ComprehensiveAssessmentBatch~1"); + b.HasIndex("ComprehensiveAssessmentBatchId", "StudentId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentResults_ComprehensiveAssessmentBatch~1"); - b.ToTable("ComprehensiveAssessmentResults"); - }); + b.ToTable("ComprehensiveAssessmentResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentDimensionId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentResultId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentResultId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Explanation") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Explanation") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("RawScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("RawScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("SourceSnapshotJson") - .HasColumnType("longtext"); + b.Property("SourceSnapshotJson") + .HasColumnType("longtext"); - b.Property("SourceStatus") - .HasColumnType("int"); + b.Property("SourceStatus") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeightedScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("WeightedScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentDimensionId"); + b.HasIndex("ComprehensiveAssessmentDimensionId"); - b.HasIndex("ComprehensiveAssessmentResultId", "ComprehensiveAssessmentDimensionId") - .IsUnique() - .HasDatabaseName("IX_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); + b.HasIndex("ComprehensiveAssessmentResultId", "ComprehensiveAssessmentDimensionId") + .IsUnique() + .HasDatabaseName("IX_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); - b.ToTable("ComprehensiveAssessmentResultDetails"); - }); + b.ToTable("ComprehensiveAssessmentResultDetails"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Category") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Category") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("CategoryCap") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("CategoryCap") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("ComprehensiveAssessmentDimensionId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentDimensionId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentSchemeId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentSchemeId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Level") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Level") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Score") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("Score") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentDimensionId"); + b.HasIndex("ComprehensiveAssessmentDimensionId"); - b.HasIndex("ComprehensiveAssessmentSchemeId", "ComprehensiveAssessmentDimensionId", "Category", "Level") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentSchemeId", "ComprehensiveAssessmentDimensionId", "Category", "Level") + .IsUnique(); - b.ToTable("ComprehensiveAssessmentRules"); - }); + b.ToTable("ComprehensiveAssessmentRules"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CompletedByUserId") - .HasColumnType("char(36)"); + b.Property("CompletedByUserId") + .HasColumnType("char(36)"); - b.Property("ComprehensiveAssessmentBatchId") - .HasColumnType("char(36)"); + b.Property("ComprehensiveAssessmentBatchId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExecutionMode") - .HasColumnType("int"); + b.Property("ExecutionMode") + .HasColumnType("int"); - b.Property("NodeType") - .HasColumnType("int"); + b.Property("NodeType") + .HasColumnType("int"); - b.Property("Note") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Note") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ScheduledAt") - .HasColumnType("datetime(6)"); + b.Property("ScheduledAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ComprehensiveAssessmentBatchId", "NodeType") - .IsUnique(); + b.HasIndex("ComprehensiveAssessmentBatchId", "NodeType") + .IsUnique(); - b.HasIndex("Status", "ScheduledAt"); + b.HasIndex("Status", "ScheduledAt"); - b.ToTable("ComprehensiveAssessmentScheduleNodes"); - }); + b.ToTable("ComprehensiveAssessmentScheduleNodes"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("Notes") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Notes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("PublicityDays") - .HasColumnType("int"); + b.Property("PublicityDays") + .HasColumnType("int"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("RankingScope") - .HasColumnType("int"); + b.Property("RankingScope") + .HasColumnType("int"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .HasColumnType("int"); + b.Property("Version") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CreatedByUserId"); + b.HasIndex("CreatedByUserId"); - b.HasIndex("CollegeId", "Status", "CreatedAt"); + b.HasIndex("CollegeId", "Status", "CreatedAt"); - b.ToTable("ComprehensiveAssessmentSchemes"); - }); + b.ToTable("ComprehensiveAssessmentSchemes"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ArchiveReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.Property("AssessmentMethod") - .HasColumnType("int"); + b.Property("AssessmentMethod") + .HasColumnType("int"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("CourseCategoryId") - .HasColumnType("char(36)"); + b.Property("CourseCategoryId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Credits") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("Credits") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EnglishName") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("EnglishName") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("GradeEvaluationMethod") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("GradeEvaluationMethod") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("IsArchived") - .IsConcurrencyToken() - .HasColumnType("tinyint(1)"); + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("LectureHours") - .HasColumnType("int"); + b.Property("LectureHours") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Nature") - .HasColumnType("int"); + b.Property("Nature") + .HasColumnType("int"); - b.Property("PracticeHours") - .HasColumnType("int"); + b.Property("PracticeHours") + .HasColumnType("int"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("TotalHours") - .HasColumnType("int"); + b.Property("TotalHours") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("CourseCategoryId"); + b.HasIndex("CourseCategoryId"); - b.HasIndex("IsArchived"); + b.HasIndex("IsArchived"); - b.HasIndex("CollegeId", "Nature"); + b.HasIndex("CollegeId", "Nature"); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Courses"); - }); + b.ToTable("Courses"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ApplicantUserId") - .HasColumnType("char(36)"); + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); - b.Property("CancelDate") - .HasColumnType("date"); + b.Property("CancelDate") + .HasColumnType("date"); - b.Property("CancelWeek") - .HasColumnType("int"); + b.Property("CancelWeek") + .HasColumnType("int"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DayOfWeek") - .HasColumnType("int"); + b.Property("DayOfWeek") + .HasColumnType("int"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("SourceClassroomId") - .HasColumnType("char(36)"); + b.Property("SourceClassroomId") + .HasColumnType("char(36)"); - b.Property("SourceDate") - .HasColumnType("date"); + b.Property("SourceDate") + .HasColumnType("date"); - b.Property("SourcePeriodCount") - .HasColumnType("int"); + b.Property("SourcePeriodCount") + .HasColumnType("int"); - b.Property("SourceScheduleEntryId") - .HasColumnType("char(36)"); + b.Property("SourceScheduleEntryId") + .HasColumnType("char(36)"); - b.Property("SourceStartPeriod") - .HasColumnType("int"); + b.Property("SourceStartPeriod") + .HasColumnType("int"); - b.Property("SourceWeek") - .HasColumnType("int"); + b.Property("SourceWeek") + .HasColumnType("int"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SubstituteTeacherId") - .HasColumnType("char(36)"); + b.Property("SubstituteTeacherId") + .HasColumnType("char(36)"); - b.Property("TargetDate") - .HasColumnType("date"); + b.Property("TargetDate") + .HasColumnType("date"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ApplicantUserId"); + b.HasIndex("ApplicantUserId"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("SubstituteTeacherId"); + b.HasIndex("SubstituteTeacherId"); - b.HasIndex("SourceScheduleEntryId", "SourceWeek"); + b.HasIndex("SourceScheduleEntryId", "SourceWeek"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.HasIndex("TeachingTaskId", "Status"); + b.HasIndex("TeachingTaskId", "Status"); - b.ToTable("CourseAdjustments"); - }); + b.ToTable("CourseAdjustments"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseCategory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("CourseCategories"); - }); + b.ToTable("CourseCategories"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseSelectionOfferingId") - .HasColumnType("char(36)"); + b.Property("CourseSelectionOfferingId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EnrolledAt") - .HasColumnType("datetime(6)"); + b.Property("EnrolledAt") + .HasColumnType("datetime(6)"); - b.Property("EnrollmentType") - .HasColumnType("int"); + b.Property("EnrollmentType") + .HasColumnType("int"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WaitlistResolutionReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("WaitlistResolutionReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("WaitlistResolvedAt") - .HasColumnType("datetime(6)"); + b.Property("WaitlistResolvedAt") + .HasColumnType("datetime(6)"); - b.Property("WaitlistedAt") - .HasColumnType("datetime(6)"); + b.Property("WaitlistedAt") + .HasColumnType("datetime(6)"); - b.Property("WithdrawnAt") - .HasColumnType("datetime(6)"); + b.Property("WithdrawnAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CourseSelectionOfferingId", "StudentId") - .IsUnique(); + b.HasIndex("CourseSelectionOfferingId", "StudentId") + .IsUnique(); - b.HasIndex("StudentId", "Status"); + b.HasIndex("StudentId", "Status"); - b.HasIndex("CourseSelectionOfferingId", "Status", "WaitlistedAt") - .HasDatabaseName("IX_CE_Offering_Status_WaitlistedAt"); + b.HasIndex("CourseSelectionOfferingId", "Status", "WaitlistedAt") + .HasDatabaseName("IX_CE_Offering_Status_WaitlistedAt"); - b.ToTable("CourseEnrollments"); - }); + b.ToTable("CourseEnrollments"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EffectiveGrade") - .HasColumnType("int"); + b.Property("EffectiveGrade") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("MajorId") - .HasColumnType("char(36)"); + b.Property("MajorId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("OriginalCourseId") - .HasColumnType("char(36)"); + b.Property("OriginalCourseId") + .HasColumnType("char(36)"); - b.Property("SubstituteCourseId") - .HasColumnType("char(36)"); + b.Property("SubstituteCourseId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MajorId"); + b.HasIndex("MajorId"); - b.HasIndex("SubstituteCourseId"); + b.HasIndex("SubstituteCourseId"); - b.HasIndex("IsEnabled", "OriginalCourseId"); + b.HasIndex("IsEnabled", "OriginalCourseId"); - b.HasIndex("OriginalCourseId", "SubstituteCourseId", "MajorId", "EffectiveGrade") - .IsUnique(); + b.HasIndex("OriginalCourseId", "SubstituteCourseId", "MajorId", "EffectiveGrade") + .IsUnique(); - b.ToTable("CourseEquivalencyRules"); - }); + b.ToTable("CourseEquivalencyRules"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("ReviewerRoleSnapshot") - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.HasIndex("StudentId", "TeachingTaskId") - .IsUnique(); + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); - b.ToTable("CourseExemptions"); - }); + b.ToTable("CourseExemptions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("AverageScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("AverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("Below60Count") - .HasColumnType("int"); + b.Property("Below60Count") + .HasColumnType("int"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("From60To69Count") - .HasColumnType("int"); + b.Property("From60To69Count") + .HasColumnType("int"); - b.Property("From70To79Count") - .HasColumnType("int"); + b.Property("From70To79Count") + .HasColumnType("int"); - b.Property("From80To89Count") - .HasColumnType("int"); + b.Property("From80To89Count") + .HasColumnType("int"); - b.Property("From90To100Count") - .HasColumnType("int"); + b.Property("From90To100Count") + .HasColumnType("int"); - b.Property("HighestScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("HighestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("LowestScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("LowestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("PassRate") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("PassRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("PassedCount") - .HasColumnType("int"); + b.Property("PassedCount") + .HasColumnType("int"); - b.Property("Scope") - .HasColumnType("int"); + b.Property("Scope") + .HasColumnType("int"); - b.Property("ScopeEntityId") - .HasColumnType("char(36)"); + b.Property("ScopeEntityId") + .HasColumnType("char(36)"); - b.Property("StudentCount") - .HasColumnType("int"); + b.Property("StudentCount") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Scope", "ScopeEntityId"); + b.HasIndex("AcademicTermId", "Scope", "ScopeEntityId"); - b.HasIndex("CourseId", "AcademicTermId", "Scope", "ScopeEntityId") - .IsUnique() - .HasDatabaseName("UX_CourseGradeStatistics_Scope"); + b.HasIndex("CourseId", "AcademicTermId", "Scope", "ScopeEntityId") + .IsUnique() + .HasDatabaseName("UX_CourseGradeStatistics_Scope"); - b.ToTable("CourseGradeStatistics"); - }); + b.ToTable("CourseGradeStatistics"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GradeSheetId"); + b.HasIndex("GradeSheetId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("CourseGradeStatisticsRefreshJobs"); - }); + b.ToTable("CourseGradeStatisticsRefreshJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BatchSize") - .HasColumnType("int"); + b.Property("BatchSize") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IntervalSeconds") - .HasColumnType("int"); + b.Property("IntervalSeconds") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Key") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Key") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("LastRunAt") - .HasColumnType("datetime(6)"); + b.Property("LastRunAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Key") - .IsUnique(); + b.HasIndex("Key") + .IsUnique(); - b.ToTable("CourseGradeStatisticsRefreshSettings"); - }); + b.ToTable("CourseGradeStatisticsRefreshSettings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Description") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.ToTable("CourseGroups"); - }); + b.ToTable("CourseGroups"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseGroupId") - .HasColumnType("char(36)"); + b.Property("CourseGroupId") + .HasColumnType("char(36)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("RecommendedSemester") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("RecommendedSemester") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CourseId"); + b.HasIndex("CourseId"); - b.HasIndex("CourseGroupId", "CourseId") - .IsUnique(); + b.HasIndex("CourseGroupId", "CourseId") + .IsUnique(); - b.ToTable("CourseGroupCourses"); - }); + b.ToTable("CourseGroupCourses"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("PrerequisiteCourseId") - .HasColumnType("char(36)"); + b.Property("PrerequisiteCourseId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PrerequisiteCourseId"); + b.HasIndex("PrerequisiteCourseId"); - b.HasIndex("CourseId", "PrerequisiteCourseId") - .IsUnique(); + b.HasIndex("CourseId", "PrerequisiteCourseId") + .IsUnique(); - b.ToTable("CoursePrerequisites"); - }); + b.ToTable("CoursePrerequisites"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Capacity") - .HasColumnType("int"); + b.Property("Capacity") + .HasColumnType("int"); - b.Property("CourseSelectionRoundId") - .HasColumnType("char(36)"); + b.Property("CourseSelectionRoundId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsOpenToAll") - .HasColumnType("tinyint(1)"); + b.Property("IsOpenToAll") + .HasColumnType("tinyint(1)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("CourseSelectionRoundId", "TeachingTaskId") - .IsUnique(); + b.HasIndex("CourseSelectionRoundId", "TeachingTaskId") + .IsUnique(); - b.ToTable("CourseSelectionOfferings"); - }); + b.ToTable("CourseSelectionOfferings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("MaxCourseCount") - .HasColumnType("int"); + b.Property("MaxCourseCount") + .HasColumnType("int"); - b.Property("MaxCredits") - .HasPrecision(6, 1) - .HasColumnType("decimal(6,1)"); + b.Property("MaxCredits") + .HasPrecision(6, 1) + .HasColumnType("decimal(6,1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Scope") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("Scope") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WithdrawalEndsAt") - .HasColumnType("datetime(6)"); + b.Property("WithdrawalEndsAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Status"); + b.HasIndex("AcademicTermId", "Status"); - b.ToTable("CourseSelectionRounds"); - }); + b.ToTable("CourseSelectionRounds"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseSelectionRoundId") - .HasColumnType("char(36)"); + b.Property("CourseSelectionRoundId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Grade") - .HasColumnType("int"); + b.Property("Grade") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Grade"); + b.HasIndex("Grade"); - b.HasIndex("CourseSelectionRoundId", "Grade") - .IsUnique(); + b.HasIndex("CourseSelectionRoundId", "Grade") + .IsUnique(); - b.ToTable("CourseSelectionRoundGrades"); - }); + b.ToTable("CourseSelectionRoundGrades"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseEquivalencyRuleId") - .HasColumnType("char(36)"); + b.Property("CourseEquivalencyRuleId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("OriginalCourseId") - .HasColumnType("char(36)"); + b.Property("OriginalCourseId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("ReviewerRoleSnapshot") - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SubstituteCourseId") - .HasColumnType("char(36)"); + b.Property("SubstituteCourseId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CourseEquivalencyRuleId"); + b.HasIndex("CourseEquivalencyRuleId"); - b.HasIndex("OriginalCourseId"); + b.HasIndex("OriginalCourseId"); - b.HasIndex("SubstituteCourseId"); + b.HasIndex("SubstituteCourseId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.HasIndex("StudentId", "OriginalCourseId") - .IsUnique(); + b.HasIndex("StudentId", "OriginalCourseId") + .IsUnique(); - b.ToTable("CourseSubstitutions"); - }); + b.ToTable("CourseSubstitutions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurriculumModuleId") - .HasColumnType("char(36)"); + b.Property("CurriculumModuleId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("RecommendedSemester") - .HasColumnType("int"); + b.Property("RecommendedSemester") + .HasColumnType("int"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CourseId"); + b.HasIndex("CourseId"); - b.HasIndex("CurriculumModuleId", "CourseId") - .IsUnique(); + b.HasIndex("CurriculumModuleId", "CourseId") + .IsUnique(); - b.ToTable("CurriculumCourses"); - }); + b.ToTable("CurriculumCourses"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurriculumPlanId") - .HasColumnType("char(36)"); + b.Property("CurriculumPlanId") + .HasColumnType("char(36)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("RequiredCredits") - .HasPrecision(6, 2) - .HasColumnType("decimal(6,2)"); + b.Property("RequiredCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CurriculumPlanId", "Code") - .IsUnique(); + b.HasIndex("CurriculumPlanId", "Code") + .IsUnique(); - b.ToTable("CurriculumModules"); - }); + b.ToTable("CurriculumModules"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EffectiveGrade") - .HasColumnType("int"); + b.Property("EffectiveGrade") + .HasColumnType("int"); - b.Property("MajorId") - .HasColumnType("char(36)"); + b.Property("MajorId") + .HasColumnType("char(36)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TotalCredits") - .HasPrecision(6, 2) - .HasColumnType("decimal(6,2)"); + b.Property("TotalCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Status", "EffectiveGrade"); + b.HasIndex("Status", "EffectiveGrade"); - b.HasIndex("MajorId", "EffectiveGrade", "Version") - .IsUnique(); + b.HasIndex("MajorId", "EffectiveGrade", "Version") + .IsUnique(); - b.ToTable("CurriculumPlans"); - }); + b.ToTable("CurriculumPlans"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedCount") - .HasColumnType("int"); + b.Property("CreatedCount") + .HasColumnType("int"); - b.Property("ErrorCount") - .HasColumnType("int"); + b.Property("ErrorCount") + .HasColumnType("int"); - b.Property("ErrorJson") - .HasColumnType("longtext"); + b.Property("ErrorJson") + .HasColumnType("longtext"); - b.Property("FileName") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("varchar(255)"); + b.Property("FileName") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); - b.Property("FileSha256") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("FileSha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("FileSize") - .HasColumnType("bigint"); + b.Property("FileSize") + .HasColumnType("bigint"); - b.Property("Module") - .IsRequired() - .HasMaxLength(80) - .HasColumnType("varchar(80)"); + b.Property("Module") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("Target") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Target") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("TotalRows") - .HasColumnType("int"); + b.Property("TotalRows") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedCount") - .HasColumnType("int"); + b.Property("UpdatedCount") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CollegeId", "CreatedAt"); + b.HasIndex("CollegeId", "CreatedAt"); - b.HasIndex("CreatedAt", "Id"); + b.HasIndex("CreatedAt", "Id"); - b.HasIndex("CreatedByUserId", "CreatedAt"); + b.HasIndex("CreatedByUserId", "CreatedAt"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("DataImportBatches"); - }); + b.ToTable("DataImportBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("ReviewerRoleSnapshot") - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("ReviewerRoleSnapshot") + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.HasIndex("StudentId", "TeachingTaskId") - .IsUnique(); + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); - b.ToTable("DeferredExams"); - }); + b.ToTable("DeferredExams"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CalculationError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("CalculationStatus") - .HasColumnType("int"); + b.Property("CalculationStatus") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DegreeName") - .IsRequired() - .HasMaxLength(80) - .HasColumnType("varchar(80)"); + b.Property("DegreeName") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); - b.Property("EnrollmentYear") - .HasColumnType("int"); + b.Property("EnrollmentYear") + .HasColumnType("int"); - b.Property("GraduationYear") - .HasColumnType("int"); + b.Property("GraduationYear") + .HasColumnType("int"); - b.Property("MinimumGradePoint") - .HasPrecision(3, 2) - .HasColumnType("decimal(3,2)"); + b.Property("MinimumGradePoint") + .HasPrecision(3, 2) + .HasColumnType("decimal(3,2)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GraduationYear", "Status"); + b.HasIndex("GraduationYear", "Status"); - b.ToTable("DegreeAwardBatches"); - }); + b.ToTable("DegreeAwardBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AverageGradePoint") - .HasPrecision(4, 2) - .HasColumnType("decimal(4,2)"); + b.Property("AverageGradePoint") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); - b.Property("CalculatedConclusion") - .HasColumnType("int"); + b.Property("CalculatedConclusion") + .HasColumnType("int"); - b.Property("Conclusion") - .HasColumnType("int"); + b.Property("Conclusion") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DegreeAwardBatchId") - .HasColumnType("char(36)"); + b.Property("DegreeAwardBatchId") + .HasColumnType("char(36)"); - b.Property("ExceptionReason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ExceptionReason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("GraduationAuditResultId") - .HasColumnType("char(36)"); + b.Property("GraduationAuditResultId") + .HasColumnType("char(36)"); - b.Property("IsOverridden") - .HasColumnType("tinyint(1)"); + b.Property("IsOverridden") + .HasColumnType("tinyint(1)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GraduationAuditResultId"); + b.HasIndex("GraduationAuditResultId"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("Conclusion", "IsOverridden"); + b.HasIndex("Conclusion", "IsOverridden"); - b.HasIndex("DegreeAwardBatchId", "StudentId") - .IsUnique(); + b.HasIndex("DegreeAwardBatchId", "StudentId") + .IsUnique(); - b.ToTable("DegreeAwardResults"); - }); + b.ToTable("DegreeAwardResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AssignedCount") - .HasColumnType("int"); + b.Property("AssignedCount") + .HasColumnType("int"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("Mode") - .HasColumnType("int"); + b.Property("Mode") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("RequestPayload") - .HasColumnType("longtext"); + b.Property("RequestPayload") + .HasColumnType("longtext"); - b.Property("RequestedCount") - .HasColumnType("int"); + b.Property("RequestedCount") + .HasColumnType("int"); - b.Property("ResultPayload") - .HasColumnType("longtext"); + b.Property("ResultPayload") + .HasColumnType("longtext"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CreatedAt"); + b.HasIndex("CreatedAt"); - b.HasIndex("CreatedByUserId"); + b.HasIndex("CreatedByUserId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("DormitoryAllocationBatches"); - }); + b.ToTable("DormitoryAllocationBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CounselorComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("CounselorComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("CounselorReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("CounselorReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CounselorReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("CounselorReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentBedId") - .HasColumnType("char(36)"); + b.Property("CurrentBedId") + .HasColumnType("char(36)"); - b.Property("FinalComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("FinalComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("FinalReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("FinalReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("FinalReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("FinalReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("PreferredBuildingId") - .HasColumnType("char(36)"); + b.Property("PreferredBuildingId") + .HasColumnType("char(36)"); - b.Property("PreferredRoomId") - .HasColumnType("char(36)"); + b.Property("PreferredRoomId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TargetBedId") - .HasColumnType("char(36)"); + b.Property("TargetBedId") + .HasColumnType("char(36)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PreferredBuildingId"); + b.HasIndex("PreferredBuildingId"); - b.HasIndex("PreferredRoomId"); + b.HasIndex("PreferredRoomId"); - b.HasIndex("Status", "SubmittedAt"); + b.HasIndex("Status", "SubmittedAt"); - b.HasIndex("StudentId", "Status"); + b.HasIndex("StudentId", "Status"); - b.ToTable("DormitoryApplications"); - }); + b.ToTable("DormitoryApplications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BedNumber") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("BedNumber") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryRoomId") - .HasColumnType("char(36)"); + b.Property("DormitoryRoomId") + .HasColumnType("char(36)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryRoomId", "BedNumber") - .IsUnique(); + b.HasIndex("DormitoryRoomId", "BedNumber") + .IsUnique(); - b.ToTable("DormitoryBeds"); - }); + b.ToTable("DormitoryBeds"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CampusId") - .HasColumnType("char(36)"); + b.Property("CampusId") + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("FloorCount") - .HasColumnType("int"); + b.Property("FloorCount") + .HasColumnType("int"); - b.Property("GenderPolicy") - .HasColumnType("int"); + b.Property("GenderPolicy") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CampusId"); + b.HasIndex("CampusId"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.ToTable("DormitoryBuildings"); - }); + b.ToTable("DormitoryBuildings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("InspectionDate") - .HasColumnType("date"); + b.Property("InspectionDate") + .HasColumnType("date"); - b.Property("Inspector") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Inspector") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("PublicationCount") - .HasColumnType("int"); + b.Property("PublicationCount") + .HasColumnType("int"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Status", "InspectionDate"); + b.HasIndex("Status", "InspectionDate"); - b.ToTable("DormitoryHygieneBatches"); - }); + b.ToTable("DormitoryHygieneBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasColumnType("char(36)"); + b.Property("CreatedByUserId") + .HasColumnType("char(36)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("SelectedBatchCount") - .HasColumnType("int"); + b.Property("SelectedBatchCount") + .HasColumnType("int"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentCount") - .HasColumnType("int"); + b.Property("StudentCount") + .HasColumnType("int"); - b.Property("StudentWithoutScoreCount") - .HasColumnType("int"); + b.Property("StudentWithoutScoreCount") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CreatedByUserId"); + b.HasIndex("CreatedByUserId"); - b.HasIndex("AcademicTermId", "Status", "CreatedAt"); + b.HasIndex("AcademicTermId", "Status", "CreatedAt"); - b.ToTable("DormitoryHygieneCalculations"); - }); + b.ToTable("DormitoryHygieneCalculations"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryHygieneBatchId") - .HasColumnType("char(36)"); + b.Property("DormitoryHygieneBatchId") + .HasColumnType("char(36)"); - b.Property("DormitoryHygieneCalculationId") - .HasColumnType("char(36)"); + b.Property("DormitoryHygieneCalculationId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryHygieneBatchId"); + b.HasIndex("DormitoryHygieneBatchId"); - b.HasIndex("DormitoryHygieneCalculationId", "DormitoryHygieneBatchId") - .IsUnique(); + b.HasIndex("DormitoryHygieneCalculationId", "DormitoryHygieneBatchId") + .IsUnique(); - b.ToTable("DormitoryHygieneCalculationBatches"); - }); + b.ToTable("DormitoryHygieneCalculationBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BeddingScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("BeddingScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("BelongingsScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("BelongingsScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryHygieneBatchId") - .HasColumnType("char(36)"); + b.Property("DormitoryHygieneBatchId") + .HasColumnType("char(36)"); - b.Property("DormitoryRoomId") - .HasColumnType("char(36)"); + b.Property("DormitoryRoomId") + .HasColumnType("char(36)"); - b.Property("FacilitiesScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("FacilitiesScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("FloorScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("FloorScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("Grade") - .HasColumnType("int"); + b.Property("Grade") + .HasColumnType("int"); - b.Property("IsViolation") - .HasColumnType("tinyint(1)"); + b.Property("IsViolation") + .HasColumnType("tinyint(1)"); - b.Property("Issues") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Issues") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("SafetyScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("SafetyScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("TotalScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryHygieneBatchId", "DormitoryRoomId") - .IsUnique(); + b.HasIndex("DormitoryHygieneBatchId", "DormitoryRoomId") + .IsUnique(); - b.HasIndex("DormitoryRoomId", "DormitoryHygieneBatchId"); + b.HasIndex("DormitoryRoomId", "DormitoryHygieneBatchId"); - b.ToTable("DormitoryHygieneScores"); - }); + b.ToTable("DormitoryHygieneScores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("AverageScore") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryHygieneCalculationId") - .HasColumnType("char(36)"); + b.Property("DormitoryHygieneCalculationId") + .HasColumnType("char(36)"); - b.Property("ExpectedBatchCount") - .HasColumnType("int"); + b.Property("ExpectedBatchCount") + .HasColumnType("int"); - b.Property("IncludedScoreCount") - .HasColumnType("int"); + b.Property("IncludedScoreCount") + .HasColumnType("int"); - b.Property("MissingScoreCount") - .HasColumnType("int"); + b.Property("MissingScoreCount") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("ViolationCount") - .HasColumnType("int"); + b.Property("ViolationCount") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("AcademicTermId", "StudentId"); + b.HasIndex("AcademicTermId", "StudentId"); - b.HasIndex("DormitoryHygieneCalculationId", "StudentId") - .IsUnique(); + b.HasIndex("DormitoryHygieneCalculationId", "StudentId") + .IsUnique(); - b.ToTable("DormitoryHygieneStudentSummaries"); - }); + b.ToTable("DormitoryHygieneStudentSummaries"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CheckInDate") - .HasColumnType("date"); + b.Property("CheckInDate") + .HasColumnType("date"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryBedId") - .HasColumnType("char(36)"); + b.Property("DormitoryBedId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryBedId") - .IsUnique(); + b.HasIndex("DormitoryBedId") + .IsUnique(); - b.HasIndex("StudentId") - .IsUnique(); + b.HasIndex("StudentId") + .IsUnique(); - b.ToTable("DormitoryOccupancies"); - }); + b.ToTable("DormitoryOccupancies"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryBuildingId") - .HasColumnType("char(36)"); + b.Property("DormitoryBuildingId") + .HasColumnType("char(36)"); - b.Property("Floor") - .HasColumnType("int"); + b.Property("Floor") + .HasColumnType("int"); - b.Property("GenderPolicy") - .HasColumnType("int"); + b.Property("GenderPolicy") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("RoomNumber") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("RoomNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryBuildingId", "RoomNumber") - .IsUnique(); + b.HasIndex("DormitoryBuildingId", "RoomNumber") + .IsUnique(); - b.ToTable("DormitoryRooms"); - }); + b.ToTable("DormitoryRooms"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Action") - .HasColumnType("int"); + b.Property("Action") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DormitoryAllocationBatchId") - .HasColumnType("char(36)"); + b.Property("DormitoryAllocationBatchId") + .HasColumnType("char(36)"); - b.Property("DormitoryApplicationId") - .HasColumnType("char(36)"); + b.Property("DormitoryApplicationId") + .HasColumnType("char(36)"); - b.Property("EffectiveDate") - .HasColumnType("date"); + b.Property("EffectiveDate") + .HasColumnType("date"); - b.Property("FromBedId") - .HasColumnType("char(36)"); + b.Property("FromBedId") + .HasColumnType("char(36)"); - b.Property("OccurredAt") - .HasColumnType("datetime(6)"); + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); - b.Property("OperatedByUserId") - .HasColumnType("char(36)"); + b.Property("OperatedByUserId") + .HasColumnType("char(36)"); - b.Property("Reason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("ToBedId") - .HasColumnType("char(36)"); + b.Property("ToBedId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DormitoryAllocationBatchId"); + b.HasIndex("DormitoryAllocationBatchId"); - b.HasIndex("FromBedId"); + b.HasIndex("FromBedId"); - b.HasIndex("ToBedId"); + b.HasIndex("ToBedId"); - b.HasIndex("StudentId", "EffectiveDate"); + b.HasIndex("StudentId", "EffectiveDate"); - b.HasIndex("StudentId", "OccurredAt"); + b.HasIndex("StudentId", "OccurredAt"); - b.ToTable("DormitoryStayHistories"); - }); + b.ToTable("DormitoryStayHistories"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EvaluationSetupId") - .HasColumnType("char(36)"); + b.Property("EvaluationSetupId") + .HasColumnType("char(36)"); - b.Property("MaxScore") - .HasColumnType("int"); + b.Property("MaxScore") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("varchar(60)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("EvaluationSetupId", "SortOrder"); + b.HasIndex("EvaluationSetupId", "SortOrder"); - b.ToTable("EvaluationDimensions"); - }); + b.ToTable("EvaluationDimensions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EvaluationSetupId") - .HasColumnType("char(36)"); + b.Property("EvaluationSetupId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("EvaluationSetupId", "StudentId", "TeachingTaskId") - .IsUnique(); + b.HasIndex("EvaluationSetupId", "StudentId", "TeachingTaskId") + .IsUnique(); - b.ToTable("EvaluationRecords"); - }); + b.ToTable("EvaluationRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => - { - b.Property("EvaluationRecordId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => + { + b.Property("EvaluationRecordId") + .HasColumnType("char(36)"); - b.Property("EvaluationDimensionId") - .HasColumnType("char(36)"); + b.Property("EvaluationDimensionId") + .HasColumnType("char(36)"); - b.Property("Score") - .HasColumnType("int"); + b.Property("Score") + .HasColumnType("int"); - b.HasKey("EvaluationRecordId", "EvaluationDimensionId"); + b.HasKey("EvaluationRecordId", "EvaluationDimensionId"); - b.HasIndex("EvaluationDimensionId"); + b.HasIndex("EvaluationDimensionId"); - b.ToTable("EvaluationScores"); - }); + b.ToTable("EvaluationScores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Status"); + b.HasIndex("AcademicTermId", "Status"); - b.ToTable("EvaluationSetups"); - }); + b.ToTable("EvaluationSetups"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamArrangementJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamArrangementJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ActivePlanId") - .HasColumnType("char(36)"); + b.Property("ActivePlanId") + .HasColumnType("char(36)"); - b.Property("AssignClassrooms") - .HasColumnType("tinyint(1)"); + b.Property("AssignClassrooms") + .HasColumnType("tinyint(1)"); - b.Property("AssignInvigilators") - .HasColumnType("tinyint(1)"); + b.Property("AssignInvigilators") + .HasColumnType("tinyint(1)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentStep") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("Kind") - .HasColumnType("int"); + b.Property("Kind") + .HasColumnType("int"); - b.Property("PlanId") - .HasColumnType("char(36)"); + b.Property("PlanId") + .HasColumnType("char(36)"); - b.Property("ProcessedSessions") - .HasColumnType("int"); + b.Property("ProcessedSessions") + .HasColumnType("int"); - b.Property("ProjectIdsJson") - .HasColumnType("longtext"); + b.Property("ProjectIdsJson") + .HasColumnType("longtext"); - b.Property("RequestedByUserId") - .HasColumnType("char(36)"); + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); - b.Property("ResultMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ResultMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("SessionIdsJson") - .HasColumnType("longtext"); + b.Property("SessionIdsJson") + .HasColumnType("longtext"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TotalSessions") - .HasColumnType("int"); + b.Property("TotalSessions") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RequestedByUserId"); + b.HasIndex("RequestedByUserId"); - b.HasIndex("Kind", "ActivePlanId") - .IsUnique() - .HasDatabaseName("UX_ExamArrangementJobs_Kind_ActivePlan"); + b.HasIndex("Kind", "ActivePlanId") + .IsUnique() + .HasDatabaseName("UX_ExamArrangementJobs_Kind_ActivePlan"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.HasIndex("Kind", "PlanId", "CreatedAt") - .HasDatabaseName("IX_ExamArrangementJobs_Kind_Plan_CreatedAt"); + b.HasIndex("Kind", "PlanId", "CreatedAt") + .HasDatabaseName("IX_ExamArrangementJobs_Kind_Plan_CreatedAt"); - b.ToTable("ExamArrangementJobs"); - }); + b.ToTable("ExamArrangementJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Status"); + b.HasIndex("AcademicTermId", "Status"); - b.ToTable("ExamPlans"); - }); + b.ToTable("ExamPlans"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPublishJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPublishJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ActivePlanId") - .HasColumnType("char(36)"); + b.Property("ActivePlanId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentStep") - .HasColumnType("longtext"); + b.Property("CurrentStep") + .HasColumnType("longtext"); - b.Property("ErrorMessage") - .HasColumnType("longtext"); + b.Property("ErrorMessage") + .HasColumnType("longtext"); - b.Property("Kind") - .HasColumnType("int"); + b.Property("Kind") + .HasColumnType("int"); - b.Property("PlanId") - .HasColumnType("char(36)"); + b.Property("PlanId") + .HasColumnType("char(36)"); - b.Property("ProjectIdsJson") - .HasColumnType("longtext"); + b.Property("ProjectIdsJson") + .HasColumnType("longtext"); - b.Property("RequestedByUserId") - .HasColumnType("char(36)"); + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.ToTable("ExamPublishJobs"); - }); + b.ToTable("ExamPublishJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("ExamDate") - .HasColumnType("date"); + b.Property("ExamDate") + .HasColumnType("date"); - b.Property("ExamPlanId") - .HasColumnType("char(36)"); + b.Property("ExamPlanId") + .HasColumnType("char(36)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("RequiredInvigilatorCount") - .HasColumnType("int"); + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("CourseId") - .HasDatabaseName("IX_ExamRooms_CourseId"); + b.HasIndex("CourseId") + .HasDatabaseName("IX_ExamRooms_CourseId"); - b.HasIndex("ExamPlanId", "StartsAt") - .HasDatabaseName("IX_ExamRooms_Plan_Time"); + b.HasIndex("ExamPlanId", "StartsAt") + .HasDatabaseName("IX_ExamRooms_Plan_Time"); - b.HasIndex("ExamPlanId", "ClassroomId", "StartsAt") - .HasDatabaseName("IX_ExamRooms_Plan_Room_Time"); + b.HasIndex("ExamPlanId", "ClassroomId", "StartsAt") + .HasDatabaseName("IX_ExamRooms_Plan_Room_Time"); - b.ToTable("ExamRooms", (string)null); - }); + b.ToTable("ExamRooms"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomInvigilator", b => - { - b.Property("ExamRoomId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomInvigilator", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.HasKey("ExamRoomId", "TeacherId"); + b.HasKey("ExamRoomId", "TeacherId"); - b.HasIndex("TeacherId") - .HasDatabaseName("IX_ExamRoomInvigilators_TeacherId"); + b.HasIndex("TeacherId") + .HasDatabaseName("IX_ExamRoomInvigilators_TeacherId"); - b.ToTable("ExamRoomInvigilators", (string)null); - }); + b.ToTable("ExamRoomInvigilators"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomSession", b => - { - b.Property("ExamRoomId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomSession", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); - b.Property("ExamSessionId") - .HasColumnType("char(36)"); + b.Property("ExamSessionId") + .HasColumnType("char(36)"); - b.HasKey("ExamRoomId", "ExamSessionId"); + b.HasKey("ExamRoomId", "ExamSessionId"); - b.HasIndex("ExamSessionId") - .HasDatabaseName("IX_ExamRoomSessions_SessionId"); + b.HasIndex("ExamSessionId") + .HasDatabaseName("IX_ExamRoomSessions_SessionId"); - b.ToTable("ExamRoomSessions", (string)null); - }); + b.ToTable("ExamRoomSessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSeatAssignment", b => - { - b.Property("ExamRoomId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSeatAssignment", b => + { + b.Property("ExamRoomId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("ExamSessionId") - .HasColumnType("char(36)"); + b.Property("ExamSessionId") + .HasColumnType("char(36)"); - b.Property("SeatNumber") - .HasColumnType("int"); + b.Property("SeatNumber") + .HasColumnType("int"); - b.HasKey("ExamRoomId", "StudentId"); + b.HasKey("ExamRoomId", "StudentId"); - b.HasIndex("StudentId") - .HasDatabaseName("IX_ExamSeats_StudentId"); + b.HasIndex("StudentId") + .HasDatabaseName("IX_ExamSeats_StudentId"); - b.HasIndex("ExamSessionId", "StudentId") - .IsUnique() - .HasDatabaseName("UX_ExamSeats_Session_Student"); + b.HasIndex("ExamSessionId", "StudentId") + .IsUnique() + .HasDatabaseName("UX_ExamSeats_Session_Student"); - b.ToTable("ExamSeats", (string)null); - }); + b.ToTable("ExamSeats"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("ExamDate") - .HasColumnType("date"); + b.Property("ExamDate") + .HasColumnType("date"); - b.Property("ExamPlanId") - .HasColumnType("char(36)"); + b.Property("ExamPlanId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("RequiredBuildingId") - .HasColumnType("char(36)"); + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); - b.Property("RequiredBuildingIds") - .HasColumnType("longtext"); + b.Property("RequiredBuildingIds") + .HasColumnType("longtext"); - b.Property("RequiredInvigilatorCount") - .HasColumnType("int"); + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("RequiredBuildingId"); + b.HasIndex("RequiredBuildingId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("ExamPlanId", "ExamDate"); + b.HasIndex("ExamPlanId", "ExamDate"); - b.HasIndex("ExamPlanId", "StartsAt"); + b.HasIndex("ExamPlanId", "StartsAt"); - b.ToTable("ExamSessions"); - }); + b.ToTable("ExamSessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => - { - b.Property("ExamSessionId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => + { + b.Property("ExamSessionId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.HasKey("ExamSessionId", "TeacherId"); + b.HasKey("ExamSessionId", "TeacherId"); - b.HasIndex("TeacherId"); + b.HasIndex("TeacherId"); - b.ToTable("ExamSessionInvigilators"); - }); + b.ToTable("ExamSessionInvigilators"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSignInExportJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSignInExportJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentStep") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("FileBytes") - .HasColumnType("longblob"); + b.Property("FileBytes") + .HasColumnType("longblob"); - b.Property("FileName") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("FileName") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("FileSize") - .HasColumnType("int"); + b.Property("FileSize") + .HasColumnType("int"); - b.Property("FilterJson") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("FilterJson") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("PlanId") - .HasColumnType("char(36)"); + b.Property("PlanId") + .HasColumnType("char(36)"); - b.Property("RequestedByUserId") - .HasColumnType("char(36)"); + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RequestedByUserId"); + b.HasIndex("RequestedByUserId"); - b.HasIndex("PlanId", "CreatedAt"); + b.HasIndex("PlanId", "CreatedAt"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("ExamSignInExportJobs"); - }); + b.ToTable("ExamSignInExportJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BookedAt") - .HasColumnType("datetime(6)"); + b.Property("BookedAt") + .HasColumnType("datetime(6)"); - b.Property("CancelledAt") - .HasColumnType("datetime(6)"); + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentProjectId") - .HasColumnType("char(36)"); + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); - b.Property("ExperimentSessionId") - .HasColumnType("char(36)"); + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ExperimentProjectId", "StudentId") - .IsUnique(); + b.HasIndex("ExperimentProjectId", "StudentId") + .IsUnique(); - b.HasIndex("ExperimentSessionId", "Status", "BookedAt"); + b.HasIndex("ExperimentSessionId", "Status", "BookedAt"); - b.ToTable("ExperimentBookings"); - }); + b.ToTable("ExperimentBookings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("PublishedProjectCount") - .HasColumnType("int"); + b.Property("PublishedProjectCount") + .HasColumnType("int"); - b.Property("RefreshedAt") - .HasColumnType("datetime(6)"); + b.Property("RefreshedAt") + .HasColumnType("datetime(6)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("TotalWeight") - .HasPrecision(8, 1) - .HasColumnType("decimal(8,1)"); + b.Property("TotalWeight") + .HasPrecision(8, 1) + .HasColumnType("decimal(8,1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeightedAverageScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("WeightedAverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("TeachingTaskId", "StudentId") - .IsUnique(); + b.HasIndex("TeachingTaskId", "StudentId") + .IsUnique(); - b.ToTable("ExperimentCourseGrades"); - }); + b.ToTable("ExperimentCourseGrades"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentGradeSheetId") - .HasColumnType("char(36)"); + b.Property("ExperimentGradeSheetId") + .HasColumnType("char(36)"); - b.Property("Kind") - .HasColumnType("int"); + b.Property("Kind") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("varchar(60)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Weight") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("Weight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ExperimentGradeSheetId", "SortOrder"); + b.HasIndex("ExperimentGradeSheetId", "SortOrder"); - b.ToTable("ExperimentGradeItems"); - }); + b.ToTable("ExperimentGradeItems"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => - { - b.Property("ExperimentGradeRecordId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => + { + b.Property("ExperimentGradeRecordId") + .HasColumnType("char(36)"); - b.Property("ExperimentGradeItemId") - .HasColumnType("char(36)"); + b.Property("ExperimentGradeItemId") + .HasColumnType("char(36)"); - b.Property("Comment") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("Comment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("Score") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("ExperimentGradeRecordId", "ExperimentGradeItemId"); + b.HasKey("ExperimentGradeRecordId", "ExperimentGradeItemId"); - b.HasIndex("ExperimentGradeItemId"); + b.HasIndex("ExperimentGradeItemId"); - b.ToTable("ExperimentGradeItemScores"); - }); + b.ToTable("ExperimentGradeItemScores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AttemptNumber") - .HasColumnType("int"); + b.Property("AttemptNumber") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentGradeSheetId") - .HasColumnType("char(36)"); + b.Property("ExperimentGradeSheetId") + .HasColumnType("char(36)"); - b.Property("ExperimentSessionId") - .HasColumnType("char(36)"); + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); - b.Property("IsLate") - .HasColumnType("tinyint(1)"); + b.Property("IsLate") + .HasColumnType("tinyint(1)"); - b.Property("IsPassed") - .HasColumnType("tinyint(1)"); + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); - b.Property("ParticipationStatus") - .HasColumnType("int"); + b.Property("ParticipationStatus") + .HasColumnType("int"); - b.Property("SafetyViolation") - .HasColumnType("tinyint(1)"); + b.Property("SafetyViolation") + .HasColumnType("tinyint(1)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmissionReference") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("SubmissionReference") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeacherComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("TeacherComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("TotalScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ExperimentSessionId"); + b.HasIndex("ExperimentSessionId"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("ExperimentGradeSheetId", "StudentId") - .IsUnique(); + b.HasIndex("ExperimentGradeSheetId", "StudentId") + .IsUnique(); - b.ToTable("ExperimentGradeRecords"); - }); + b.ToTable("ExperimentGradeRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ContributionWeight") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("ContributionWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentProjectId") - .HasColumnType("char(36)"); + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); - b.Property("PassScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("PassScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ExperimentProjectId") - .IsUnique(); + b.HasIndex("ExperimentProjectId") + .IsUnique(); - b.ToTable("ExperimentGradeSheets"); - }); + b.ToTable("ExperimentGradeSheets"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ArrangementMode") - .HasColumnType("int"); + b.Property("ArrangementMode") + .HasColumnType("int"); - b.Property("ClosedAt") - .HasColumnType("datetime(6)"); + b.Property("ClosedAt") + .HasColumnType("datetime(6)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Description") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Description") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EndDate") - .HasColumnType("date"); + b.Property("EndDate") + .HasColumnType("date"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Requirements") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Requirements") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("ScheduleEntryId") - .HasColumnType("char(36)"); + b.Property("ScheduleEntryId") + .HasColumnType("char(36)"); - b.Property("ScheduleWeek") - .HasColumnType("int"); + b.Property("ScheduleWeek") + .HasColumnType("int"); - b.Property("SelectionEndsAt") - .HasColumnType("datetime(6)"); + b.Property("SelectionEndsAt") + .HasColumnType("datetime(6)"); - b.Property("SelectionStartsAt") - .HasColumnType("datetime(6)"); + b.Property("SelectionStartsAt") + .HasColumnType("datetime(6)"); - b.Property("StartDate") - .HasColumnType("date"); + b.Property("StartDate") + .HasColumnType("date"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ScheduleEntryId"); + b.HasIndex("ScheduleEntryId"); - b.HasIndex("Status", "StartDate", "EndDate"); + b.HasIndex("Status", "StartDate", "EndDate"); - b.HasIndex("TeachingTaskId", "Code", "ScheduleEntryId", "ScheduleWeek") - .IsUnique(); + b.HasIndex("TeachingTaskId", "Code", "ScheduleEntryId", "ScheduleWeek") + .IsUnique(); - b.ToTable("ExperimentProjects"); - }); + b.ToTable("ExperimentProjects"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CancelledAt") - .HasColumnType("datetime(6)"); + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); - b.Property("Capacity") - .HasColumnType("int"); + b.Property("Capacity") + .HasColumnType("int"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentProjectId") - .HasColumnType("char(36)"); + b.Property("ExperimentProjectId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("ReservedCount") - .HasColumnType("int"); + b.Property("ReservedCount") + .HasColumnType("int"); - b.Property("SessionDate") - .HasColumnType("date"); + b.Property("SessionDate") + .HasColumnType("date"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ExperimentProjectId", "SessionDate", "StartPeriod"); + b.HasIndex("ExperimentProjectId", "SessionDate", "StartPeriod"); - b.HasIndex("ClassroomId", "SessionDate", "Status", "StartPeriod"); + b.HasIndex("ClassroomId", "SessionDate", "Status", "StartPeriod"); - b.ToTable("ExperimentSessions"); - }); + b.ToTable("ExperimentSessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExperimentSessionId") - .HasColumnType("char(36)"); + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("TeacherId"); + b.HasIndex("TeacherId"); - b.HasIndex("ExperimentSessionId", "TeacherId") - .IsUnique(); + b.HasIndex("ExperimentSessionId", "TeacherId") + .IsUnique(); - b.ToTable("ExperimentSessionInstructors"); - }); + b.ToTable("ExperimentSessionInstructors"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AuthorUserId") - .HasColumnType("char(36)"); + b.Property("AuthorUserId") + .HasColumnType("char(36)"); - b.Property("Content") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsAnonymous") - .HasColumnType("tinyint(1)"); + b.Property("IsAnonymous") + .HasColumnType("tinyint(1)"); - b.Property("ParentCommentId") - .HasColumnType("char(36)"); + b.Property("ParentCommentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AuthorUserId"); + b.HasIndex("AuthorUserId"); - b.HasIndex("CourseId", "CreatedAt", "Id"); + b.HasIndex("CourseId", "CreatedAt", "Id"); - b.HasIndex("ParentCommentId", "CreatedAt", "Id"); + b.HasIndex("ParentCommentId", "CreatedAt", "Id"); - b.ToTable("GradeAnalyticsComments"); - }); + b.ToTable("GradeAnalyticsComments"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CommentId") - .HasColumnType("char(36)"); + b.Property("CommentId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.HasIndex("CommentId", "UserId", "Type") - .IsUnique(); + b.HasIndex("CommentId", "UserId", "Type") + .IsUnique(); - b.ToTable("GradeAnalyticsCommentReactions"); - }); + b.ToTable("GradeAnalyticsCommentReactions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GradeModificationId") - .HasColumnType("char(36)"); + b.Property("GradeModificationId") + .HasColumnType("char(36)"); - b.Property("GradeRecordId") - .HasColumnType("char(36)"); + b.Property("GradeRecordId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeacherResponse") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("TeacherResponse") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WithdrawnAt") - .HasColumnType("datetime(6)"); + b.Property("WithdrawnAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GradeModificationId") - .IsUnique(); + b.HasIndex("GradeModificationId") + .IsUnique(); - b.HasIndex("GradeRecordId", "Status"); + b.HasIndex("GradeRecordId", "Status"); - b.HasIndex("StudentId", "SubmittedAt"); + b.HasIndex("StudentId", "SubmittedAt"); - b.ToTable("GradeAppeals"); - }); + b.ToTable("GradeAppeals"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(60) - .HasColumnType("varchar(60)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("varchar(60)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("SourceSnapshotAt") - .HasColumnType("datetime(6)"); + b.Property("SourceSnapshotAt") + .HasColumnType("datetime(6)"); - b.Property("SourceType") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("SourceType") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Weight") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("Weight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GradeSheetId", "SortOrder"); + b.HasIndex("GradeSheetId", "SortOrder"); - b.ToTable("GradeItems"); - }); + b.ToTable("GradeItems"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => - { - b.Property("GradeRecordId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => + { + b.Property("GradeRecordId") + .HasColumnType("char(36)"); - b.Property("GradeItemId") - .HasColumnType("char(36)"); + b.Property("GradeItemId") + .HasColumnType("char(36)"); - b.Property("Score") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("GradeRecordId", "GradeItemId"); + b.HasKey("GradeRecordId", "GradeItemId"); - b.HasIndex("GradeItemId"); + b.HasIndex("GradeItemId"); - b.ToTable("GradeItemScores"); - }); + b.ToTable("GradeItemScores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ApplicantUserId") - .HasColumnType("char(36)"); + b.Property("ApplicantUserId") + .HasColumnType("char(36)"); - b.Property("CollegeReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("CollegeReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CollegeReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("CollegeReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentResult") - .HasColumnType("int"); + b.Property("CurrentResult") + .HasColumnType("int"); - b.Property("CurrentScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("CurrentScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("FinalReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("FinalReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("FinalReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("FinalReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("GradeRecordId") - .HasColumnType("char(36)"); + b.Property("GradeRecordId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("RequestedResult") - .HasColumnType("int"); + b.Property("RequestedResult") + .HasColumnType("int"); - b.Property("RequestedScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("RequestedScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GradeRecordId"); + b.HasIndex("GradeRecordId"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("GradeModifications"); - }); + b.ToTable("GradeModifications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExamStatus") - .HasColumnType("int"); + b.Property("ExamStatus") + .HasColumnType("int"); - b.Property("FinalScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("FinalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("GradePoint") - .HasPrecision(3, 1) - .HasColumnType("decimal(3,1)"); + b.Property("GradePoint") + .HasPrecision(3, 1) + .HasColumnType("decimal(3,1)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("IsPassed") - .HasColumnType("tinyint(1)"); + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); - b.Property("Notes") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("Notes") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("RegularScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("RegularScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("Result") - .HasColumnType("int"); + b.Property("Result") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TotalScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PublishedAt"); + b.HasIndex("PublishedAt"); - b.HasIndex("GradeSheetId", "StudentId") - .IsUnique(); + b.HasIndex("GradeSheetId", "StudentId") + .IsUnique(); - b.HasIndex("StudentId", "TotalScore"); + b.HasIndex("StudentId", "TotalScore"); - b.ToTable("GradeRecords"); - }); + b.ToTable("GradeRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ComponentType") - .HasColumnType("int"); + b.Property("ComponentType") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GradeItemId") - .HasColumnType("char(36)"); + b.Property("GradeItemId") + .HasColumnType("char(36)"); - b.Property("GradeRecordId") - .HasColumnType("char(36)"); + b.Property("GradeRecordId") + .HasColumnType("char(36)"); - b.Property("GradeSubmissionBatchId") - .HasColumnType("char(36)"); + b.Property("GradeSubmissionBatchId") + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SubmittedByUserId") - .HasColumnType("char(36)"); + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GradeSubmissionBatchId"); + b.HasIndex("GradeSubmissionBatchId"); - b.HasIndex("SubmittedByUserId"); + b.HasIndex("SubmittedByUserId"); - b.HasIndex("GradeRecordId", "ComponentType", "GradeItemId") - .IsUnique(); + b.HasIndex("GradeRecordId", "ComponentType", "GradeItemId") + .IsUnique(); - b.ToTable("GradeScoreSubmissions"); - }); + b.ToTable("GradeScoreSubmissions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ArchiveReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EvaluationMethod") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("EvaluationMethod") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("FinalWeight") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("FinalWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("IsArchived") - .IsConcurrencyToken() - .HasColumnType("tinyint(1)"); + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("RegularWeight") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("RegularWeight") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("IsArchived"); + b.HasIndex("IsArchived"); - b.HasIndex("Status"); + b.HasIndex("Status"); - b.HasIndex("TeachingTaskId") - .IsUnique(); + b.HasIndex("TeachingTaskId") + .IsUnique(); - b.ToTable("GradeSheets"); - }); + b.ToTable("GradeSheets"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SubmittedByUserId") - .HasColumnType("char(36)"); + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("SubmittedByUserId"); + b.HasIndex("SubmittedByUserId"); - b.HasIndex("GradeSheetId", "Status"); + b.HasIndex("GradeSheetId", "Status"); - b.ToTable("GradeSubmissionBatches"); - }); + b.ToTable("GradeSubmissionBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => - { - b.Property("GradeSubmissionBatchId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => + { + b.Property("GradeSubmissionBatchId") + .HasColumnType("char(36)"); - b.Property("GradeRecordId") - .HasColumnType("char(36)"); + b.Property("GradeRecordId") + .HasColumnType("char(36)"); - b.HasKey("GradeSubmissionBatchId", "GradeRecordId"); + b.HasKey("GradeSubmissionBatchId", "GradeRecordId"); - b.HasIndex("GradeRecordId"); + b.HasIndex("GradeRecordId"); - b.ToTable("GradeSubmissionBatchRecords"); - }); + b.ToTable("GradeSubmissionBatchRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CalculationError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("CalculationError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("CalculationStatus") - .HasColumnType("int"); + b.Property("CalculationStatus") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EnrollmentYear") - .HasColumnType("int"); + b.Property("EnrollmentYear") + .HasColumnType("int"); - b.Property("GraduationYear") - .HasColumnType("int"); + b.Property("GraduationYear") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Status"); + b.HasIndex("Status"); - b.HasIndex("GraduationYear", "EnrollmentYear"); + b.HasIndex("GraduationYear", "EnrollmentYear"); - b.ToTable("GraduationAuditBatches"); - }); + b.ToTable("GraduationAuditBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CalculatedConclusion") - .HasColumnType("int"); + b.Property("CalculatedConclusion") + .HasColumnType("int"); - b.Property("Conclusion") - .HasColumnType("int"); + b.Property("Conclusion") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurriculumPlanId") - .HasColumnType("char(36)"); + b.Property("CurriculumPlanId") + .HasColumnType("char(36)"); - b.Property("EarnedCredits") - .HasPrecision(6, 2) - .HasColumnType("decimal(6,2)"); + b.Property("EarnedCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); - b.Property("FailedCourseCount") - .HasColumnType("int"); + b.Property("FailedCourseCount") + .HasColumnType("int"); - b.Property("GraduationAuditBatchId") - .HasColumnType("char(36)"); + b.Property("GraduationAuditBatchId") + .HasColumnType("char(36)"); - b.Property("IsOverridden") - .HasColumnType("tinyint(1)"); + b.Property("IsOverridden") + .HasColumnType("tinyint(1)"); - b.Property("MissingCourseNames") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("MissingCourseNames") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("PassedRequiredCourseCount") - .HasColumnType("int"); + b.Property("PassedRequiredCourseCount") + .HasColumnType("int"); - b.Property("RequiredCourseCount") - .HasColumnType("int"); + b.Property("RequiredCourseCount") + .HasColumnType("int"); - b.Property("RequiredCredits") - .HasPrecision(6, 2) - .HasColumnType("decimal(6,2)"); + b.Property("RequiredCredits") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("StudentStatusSnapshot") - .HasColumnType("int"); + b.Property("StudentStatusSnapshot") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CurriculumPlanId"); + b.HasIndex("CurriculumPlanId"); - b.HasIndex("StudentId"); + b.HasIndex("StudentId"); - b.HasIndex("Conclusion", "IsOverridden"); + b.HasIndex("Conclusion", "IsOverridden"); - b.HasIndex("GraduationAuditBatchId", "StudentId") - .IsUnique(); + b.HasIndex("GraduationAuditBatchId", "StudentId") + .IsUnique(); - b.ToTable("GraduationAuditResults"); - }); + b.ToTable("GraduationAuditResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClosedAt") - .HasColumnType("datetime(6)"); + b.Property("ClosedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GraduationYear") - .HasColumnType("int"); + b.Property("GraduationYear") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GraduationYear", "Status"); + b.HasIndex("GraduationYear", "Status"); - b.ToTable("GraduationClearanceBatches"); - }); + b.ToTable("GraduationClearanceBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GraduationClearanceBatchId") - .HasColumnType("char(36)"); + b.Property("GraduationClearanceBatchId") + .HasColumnType("char(36)"); - b.Property("IsRequired") - .HasColumnType("tinyint(1)"); + b.Property("IsRequired") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("ResponsibleRole") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("ResponsibleRole") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("ResponsibleUnit") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("ResponsibleUnit") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GraduationClearanceBatchId", "Code") - .IsUnique(); + b.HasIndex("GraduationClearanceBatchId", "Code") + .IsUnique(); - b.ToTable("GraduationClearanceItems"); - }); + b.ToTable("GraduationClearanceItems"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CompletedByUserId") - .HasColumnType("char(36)"); + b.Property("CompletedByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GraduationClearanceItemId") - .HasColumnType("char(36)"); + b.Property("GraduationClearanceItemId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("GraduationClearanceItemId", "StudentId") - .IsUnique(); + b.HasIndex("GraduationClearanceItemId", "StudentId") + .IsUnique(); - b.HasIndex("StudentId", "Status"); + b.HasIndex("StudentId", "Status"); - b.ToTable("GraduationClearanceRecords"); - }); + b.ToTable("GraduationClearanceRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Code") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Code") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DegreeType") - .IsRequired() - .HasColumnType("longtext"); + b.Property("DegreeType") + .IsRequired() + .HasColumnType("longtext"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SchoolingYears") - .HasColumnType("int"); + b.Property("SchoolingYears") + .HasColumnType("int"); - b.Property("SortOrder") - .HasColumnType("int"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Code") - .IsUnique(); + b.HasIndex("Code") + .IsUnique(); - b.HasIndex("CollegeId"); + b.HasIndex("CollegeId"); - b.HasIndex("IsEnabled", "SortOrder"); + b.HasIndex("IsEnabled", "SortOrder"); - b.ToTable("Majors"); - }); + b.ToTable("Majors"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedSessions") - .HasColumnType("int"); + b.Property("CreatedSessions") + .HasColumnType("int"); - b.Property("EnrolledStudents") - .HasColumnType("int"); + b.Property("EnrolledStudents") + .HasColumnType("int"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("MakeupExamPlanId") - .HasColumnType("char(36)"); + b.Property("MakeupExamPlanId") + .HasColumnType("char(36)"); - b.Property("MessagesJson") - .HasColumnType("longtext"); + b.Property("MessagesJson") + .HasColumnType("longtext"); - b.Property("ProcessedCourses") - .HasColumnType("int"); + b.Property("ProcessedCourses") + .HasColumnType("int"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TotalCourses") - .HasColumnType("int"); + b.Property("TotalCourses") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("MakeupExamPlanId", "CreatedAt"); + b.HasIndex("MakeupExamPlanId", "CreatedAt"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("MakeupExamAutoJobs"); - }); + b.ToTable("MakeupExamAutoJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => - { - b.Property("MakeupExamSessionId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => + { + b.Property("MakeupExamSessionId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("MakeupScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("MakeupScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("Reason") - .HasColumnType("int"); + b.Property("Reason") + .HasColumnType("int"); - b.Property("SourceDeferredExamId") - .HasColumnType("char(36)"); + b.Property("SourceDeferredExamId") + .HasColumnType("char(36)"); - b.Property("SourceGradeRecordId") - .HasColumnType("char(36)"); + b.Property("SourceGradeRecordId") + .HasColumnType("char(36)"); - b.HasKey("MakeupExamSessionId", "StudentId"); + b.HasKey("MakeupExamSessionId", "StudentId"); - b.HasIndex("SourceDeferredExamId"); + b.HasIndex("SourceDeferredExamId"); - b.HasIndex("SourceGradeRecordId"); + b.HasIndex("SourceGradeRecordId"); - b.HasIndex("StudentId", "MakeupExamSessionId"); + b.HasIndex("StudentId", "MakeupExamSessionId"); - b.ToTable("MakeupExamEnrollments"); - }); + b.ToTable("MakeupExamEnrollments"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Status"); + b.HasIndex("AcademicTermId", "Status"); - b.ToTable("MakeupExamPlans"); - }); + b.ToTable("MakeupExamPlans"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("ExamDate") - .HasColumnType("date"); + b.Property("ExamDate") + .HasColumnType("date"); - b.Property("MakeupExamPlanId") - .HasColumnType("char(36)"); + b.Property("MakeupExamPlanId") + .HasColumnType("char(36)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("RequiredBuildingId") - .HasColumnType("char(36)"); + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); - b.Property("RequiredBuildingIds") - .HasColumnType("longtext"); + b.Property("RequiredBuildingIds") + .HasColumnType("longtext"); - b.Property("RequiredInvigilatorCount") - .HasColumnType("int"); + b.Property("RequiredInvigilatorCount") + .HasColumnType("int"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("RequiredBuildingId"); + b.HasIndex("RequiredBuildingId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("MakeupExamPlanId", "ExamDate"); + b.HasIndex("MakeupExamPlanId", "ExamDate"); - b.HasIndex("MakeupExamPlanId", "StartsAt"); + b.HasIndex("MakeupExamPlanId", "StartsAt"); - b.ToTable("MakeupExamSessions"); - }); + b.ToTable("MakeupExamSessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => - { - b.Property("MakeupExamSessionId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => + { + b.Property("MakeupExamSessionId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.HasKey("MakeupExamSessionId", "TeacherId"); + b.HasKey("MakeupExamSessionId", "TeacherId"); - b.HasIndex("TeacherId"); + b.HasIndex("TeacherId"); - b.ToTable("MakeupExamSessionInvigilators"); - }); + b.ToTable("MakeupExamSessionInvigilators"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AudienceId") - .HasColumnType("char(36)"); + b.Property("AudienceId") + .HasColumnType("char(36)"); - b.Property("AudienceName") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("AudienceName") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("AudienceType") - .HasColumnType("int"); + b.Property("AudienceType") + .HasColumnType("int"); - b.Property("Category") - .HasColumnType("int"); + b.Property("Category") + .HasColumnType("int"); - b.Property("Content") - .IsRequired() - .HasColumnType("longtext"); + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("LinkUrl") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("LinkUrl") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("RecipientCount") - .HasColumnType("int"); + b.Property("RecipientCount") + .HasColumnType("int"); - b.Property("SenderName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("SenderName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("SenderUserId") - .HasColumnType("char(36)"); + b.Property("SenderUserId") + .HasColumnType("char(36)"); - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("SenderUserId", "CreatedAt"); + b.HasIndex("SenderUserId", "CreatedAt"); - b.ToTable("MessageDispatches"); - }); + b.ToTable("MessageDispatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Category") - .HasColumnType("int"); + b.Property("Category") + .HasColumnType("int"); - b.Property("Content") - .IsRequired() - .HasColumnType("longtext"); + b.Property("Content") + .IsRequired() + .HasColumnType("longtext"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExternalDeliveryPlannedAt") - .HasColumnType("datetime(6)"); + b.Property("ExternalDeliveryPlannedAt") + .HasColumnType("datetime(6)"); - b.Property("IsRead") - .HasColumnType("tinyint(1)"); + b.Property("IsRead") + .HasColumnType("tinyint(1)"); - b.Property("LinkUrl") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("LinkUrl") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("MessageDispatchId") - .HasColumnType("char(36)"); + b.Property("MessageDispatchId") + .HasColumnType("char(36)"); - b.Property("Title") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Title") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CreatedAt"); + b.HasIndex("CreatedAt"); - b.HasIndex("MessageDispatchId"); + b.HasIndex("MessageDispatchId"); - b.HasIndex("ExternalDeliveryPlannedAt", "CreatedAt"); + b.HasIndex("ExternalDeliveryPlannedAt", "CreatedAt"); - b.HasIndex("UserId", "CreatedAt", "Id"); + b.HasIndex("UserId", "CreatedAt", "Id"); - b.HasIndex("UserId", "Category", "CreatedAt", "Id"); + b.HasIndex("UserId", "Category", "CreatedAt", "Id"); - b.HasIndex("UserId", "IsRead", "CreatedAt", "Id"); + b.HasIndex("UserId", "IsRead", "CreatedAt", "Id"); - b.ToTable("Notifications"); - }); + b.ToTable("Notifications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AttemptCount") - .HasColumnType("int"); + b.Property("AttemptCount") + .HasColumnType("int"); - b.Property("Channel") - .HasColumnType("int"); + b.Property("Channel") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DeliveredAt") - .HasColumnType("datetime(6)"); + b.Property("DeliveredAt") + .HasColumnType("datetime(6)"); - b.Property("LastAttemptAt") - .HasColumnType("datetime(6)"); + b.Property("LastAttemptAt") + .HasColumnType("datetime(6)"); - b.Property("LastError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("NextAttemptAt") - .HasColumnType("datetime(6)"); + b.Property("NextAttemptAt") + .HasColumnType("datetime(6)"); - b.Property("NotificationId") - .HasColumnType("char(36)"); + b.Property("NotificationId") + .HasColumnType("char(36)"); - b.Property("ProviderMessageId") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("ProviderMessageId") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("State") - .HasColumnType("int"); + b.Property("State") + .HasColumnType("int"); - b.Property("TargetKey") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("TargetKey") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("WebPushSubscriptionId") - .HasColumnType("char(36)"); + b.Property("WebPushSubscriptionId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("WebPushSubscriptionId"); + b.HasIndex("WebPushSubscriptionId"); - b.HasIndex("State", "NextAttemptAt"); + b.HasIndex("State", "NextAttemptAt"); - b.HasIndex("NotificationId", "Channel", "TargetKey") - .IsUnique(); + b.HasIndex("NotificationId", "Channel", "TargetKey") + .IsUnique(); - b.HasIndex("UserId", "CreatedAt", "Id"); + b.HasIndex("UserId", "CreatedAt", "Id"); - b.ToTable("NotificationDeliveries"); - }); + b.ToTable("NotificationDeliveries"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EmailEnabled") - .HasColumnType("tinyint(1)"); + b.Property("EmailEnabled") + .HasColumnType("tinyint(1)"); - b.Property("QuietEndMinute") - .HasColumnType("int"); + b.Property("QuietEndMinute") + .HasColumnType("int"); - b.Property("QuietHoursEnabled") - .HasColumnType("tinyint(1)"); + b.Property("QuietHoursEnabled") + .HasColumnType("tinyint(1)"); - b.Property("QuietStartMinute") - .HasColumnType("int"); + b.Property("QuietStartMinute") + .HasColumnType("int"); - b.Property("TimeZoneId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("TimeZoneId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("WebPushEnabled") - .HasColumnType("tinyint(1)"); + b.Property("WebPushEnabled") + .HasColumnType("tinyint(1)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("UserId") - .IsUnique(); + b.HasIndex("UserId") + .IsUnique(); - b.ToTable("NotificationPreferences"); - }); + b.ToTable("NotificationPreferences"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DocumentNumber") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("DocumentNumber") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("InvalidatedAt") - .HasColumnType("datetime(6)"); + b.Property("InvalidatedAt") + .HasColumnType("datetime(6)"); - b.Property("InvalidatedByUserId") - .HasColumnType("char(36)"); + b.Property("InvalidatedByUserId") + .HasColumnType("char(36)"); - b.Property("InvalidationReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("InvalidationReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("IssuedAt") - .HasColumnType("datetime(6)"); + b.Property("IssuedAt") + .HasColumnType("datetime(6)"); - b.Property("IssuedByUserId") - .HasColumnType("char(36)"); + b.Property("IssuedByUserId") + .HasColumnType("char(36)"); - b.Property("PdfContent") - .IsRequired() - .HasColumnType("longblob"); + b.Property("PdfContent") + .IsRequired() + .HasColumnType("longblob"); - b.Property("PdfSha256") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("PdfSha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("Purpose") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Purpose") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("ReissuedFromDocumentId") - .HasColumnType("char(36)"); + b.Property("ReissuedFromDocumentId") + .HasColumnType("char(36)"); - b.Property("SnapshotJson") - .IsRequired() - .HasColumnType("longtext"); + b.Property("SnapshotJson") + .IsRequired() + .HasColumnType("longtext"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("Type") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("VerificationCodeHash") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("VerificationCodeHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DocumentNumber") - .IsUnique(); + b.HasIndex("DocumentNumber") + .IsUnique(); - b.HasIndex("InvalidatedByUserId"); + b.HasIndex("InvalidatedByUserId"); - b.HasIndex("IssuedByUserId"); + b.HasIndex("IssuedByUserId"); - b.HasIndex("ReissuedFromDocumentId") - .IsUnique(); + b.HasIndex("ReissuedFromDocumentId") + .IsUnique(); - b.HasIndex("VerificationCodeHash") - .IsUnique(); + b.HasIndex("VerificationCodeHash") + .IsUnique(); - b.HasIndex("Status", "IssuedAt"); + b.HasIndex("Status", "IssuedAt"); - b.HasIndex("StudentId", "IssuedAt"); + b.HasIndex("StudentId", "IssuedAt"); - b.ToTable("OfficialDocuments"); - }); + b.ToTable("OfficialDocuments"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DownloadedByUserId") - .HasColumnType("char(36)"); + b.Property("DownloadedByUserId") + .HasColumnType("char(36)"); - b.Property("IpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("OfficialDocumentId") - .HasColumnType("char(36)"); + b.Property("OfficialDocumentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserAgent") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("DownloadedByUserId", "CreatedAt"); + b.HasIndex("DownloadedByUserId", "CreatedAt"); - b.HasIndex("OfficialDocumentId", "CreatedAt"); + b.HasIndex("OfficialDocumentId", "CreatedAt"); - b.ToTable("OfficialDocumentDownloads"); - }); + b.ToTable("OfficialDocumentDownloads"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExamCode") - .HasMaxLength(60) - .HasColumnType("varchar(60)"); + b.Property("ExamCode") + .HasMaxLength(60) + .HasColumnType("varchar(60)"); - b.Property("ExamDate") - .HasColumnType("date"); + b.Property("ExamDate") + .HasColumnType("date"); - b.Property("LevelOptions") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("LevelOptions") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("MaxScore") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("MaxScore") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("MetricKind") - .HasColumnType("int"); + b.Property("MetricKind") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("Organizer") - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Organizer") + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("PublicationCount") - .HasColumnType("int"); + b.Property("PublicationCount") + .HasColumnType("int"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("Status", "ExamDate"); + b.HasIndex("Status", "ExamDate"); - b.ToTable("OtherExamBatches"); - }); + b.ToTable("OtherExamBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AttemptNumber") - .HasColumnType("int"); + b.Property("AttemptNumber") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsPassed") - .HasColumnType("tinyint(1)"); + b.Property("IsPassed") + .HasColumnType("tinyint(1)"); - b.Property("Level") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Level") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("OtherExamBatchId") - .HasColumnType("char(36)"); + b.Property("OtherExamBatchId") + .HasColumnType("char(36)"); - b.Property("Score") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("Score") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("StudentId", "OtherExamBatchId"); + b.HasIndex("StudentId", "OtherExamBatchId"); - b.HasIndex("OtherExamBatchId", "StudentId", "AttemptNumber") - .IsUnique(); + b.HasIndex("OtherExamBatchId", "StudentId", "AttemptNumber") + .IsUnique(); - b.ToTable("OtherExamResults"); - }); + b.ToTable("OtherExamResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicYear") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("AcademicYear") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(150) - .HasColumnType("varchar(150)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(150) + .HasColumnType("varchar(150)"); - b.Property("PublicationCount") - .HasColumnType("int"); + b.Property("PublicationCount") + .HasColumnType("int"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("StandardVersion") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("StandardVersion") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TestDate") - .HasColumnType("date"); + b.Property("TestDate") + .HasColumnType("date"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicYear", "TestDate"); + b.HasIndex("AcademicYear", "TestDate"); - b.ToTable("PhysicalTestBatches"); - }); + b.ToTable("PhysicalTestBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BonusScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("BonusScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ItemCode") - .HasColumnType("int"); + b.Property("ItemCode") + .HasColumnType("int"); - b.Property("PhysicalTestRecordId") - .HasColumnType("char(36)"); + b.Property("PhysicalTestRecordId") + .HasColumnType("char(36)"); - b.Property("Score") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("Score") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("Unit") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("Unit") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Value") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.Property("Value") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("Weight") - .HasPrecision(4, 2) - .HasColumnType("decimal(4,2)"); + b.Property("Weight") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); - b.Property("WeightedScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("WeightedScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PhysicalTestRecordId", "ItemCode") - .IsUnique(); + b.HasIndex("PhysicalTestRecordId", "ItemCode") + .IsUnique(); - b.ToTable("PhysicalTestItemResults"); - }); + b.ToTable("PhysicalTestItemResults"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("BonusScore") - .HasPrecision(4, 1) - .HasColumnType("decimal(4,1)"); + b.Property("BonusScore") + .HasPrecision(4, 1) + .HasColumnType("decimal(4,1)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Grade") - .HasColumnType("int"); + b.Property("Grade") + .HasColumnType("int"); - b.Property("GradeLevel") - .HasColumnType("int"); + b.Property("GradeLevel") + .HasColumnType("int"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PhysicalTestBatchId") - .HasColumnType("char(36)"); + b.Property("PhysicalTestBatchId") + .HasColumnType("char(36)"); - b.Property("SpecialReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("SpecialReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("StandardScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("StandardScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TotalScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("TotalScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("PhysicalTestBatchId", "StudentId") - .IsUnique(); + b.HasIndex("PhysicalTestBatchId", "StudentId") + .IsUnique(); - b.HasIndex("StudentId", "PhysicalTestBatchId"); + b.HasIndex("StudentId", "PhysicalTestBatchId"); - b.ToTable("PhysicalTestRecords"); - }); + b.ToTable("PhysicalTestRecords"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DayOfWeek") - .HasColumnType("int"); + b.Property("DayOfWeek") + .HasColumnType("int"); - b.Property("Kind") - .HasColumnType("int"); + b.Property("Kind") + .HasColumnType("int"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("ScheduleEntryId") - .HasColumnType("char(36)"); + b.Property("ScheduleEntryId") + .HasColumnType("char(36)"); - b.Property("SchedulePlanId") - .HasColumnType("char(36)"); + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Week") - .HasColumnType("int"); + b.Property("Week") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("ScheduleEntryId", "Week") - .IsUnique(); + b.HasIndex("ScheduleEntryId", "Week") + .IsUnique(); - b.HasIndex("AcademicTermId", "TeachingTaskId", "Week"); + b.HasIndex("AcademicTermId", "TeachingTaskId", "Week"); - b.HasIndex("AcademicTermId", "Week", "DayOfWeek", "StartPeriod", "ClassroomId"); + b.HasIndex("AcademicTermId", "Week", "DayOfWeek", "StartPeriod", "ClassroomId"); - b.HasIndex("SchedulePlanId", "ClassroomId", "Week", "DayOfWeek", "StartPeriod"); + b.HasIndex("SchedulePlanId", "ClassroomId", "Week", "DayOfWeek", "StartPeriod"); - b.ToTable("PublishedScheduleOccurrences"); - }); + b.ToTable("PublishedScheduleOccurrences"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DayOfWeek") - .HasColumnType("int"); + b.Property("DayOfWeek") + .HasColumnType("int"); - b.Property("EndWeek") - .HasColumnType("int"); + b.Property("EndWeek") + .HasColumnType("int"); - b.Property("Kind") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); + b.Property("Kind") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PeriodCount") - .HasColumnType("int"); + b.Property("PeriodCount") + .HasColumnType("int"); - b.Property("SchedulePlanId") - .HasColumnType("char(36)"); + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); - b.Property("StartPeriod") - .HasColumnType("int"); + b.Property("StartPeriod") + .HasColumnType("int"); - b.Property("StartWeek") - .HasColumnType("int"); + b.Property("StartWeek") + .HasColumnType("int"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeekPattern") - .HasColumnType("int"); + b.Property("WeekPattern") + .HasColumnType("int"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ClassroomId"); + b.HasIndex("ClassroomId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("TeachingTaskId"); - b.HasIndex("SchedulePlanId", "DayOfWeek", "StartPeriod"); + b.HasIndex("SchedulePlanId", "DayOfWeek", "StartPeriod"); - b.ToTable("ScheduleEntries"); - }); + b.ToTable("ScheduleEntries"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("ClassGapWeight") - .HasColumnType("int"); + b.Property("ClassGapWeight") + .HasColumnType("int"); - b.Property("ClassSameDayWeight") - .HasColumnType("int"); + b.Property("ClassSameDayWeight") + .HasColumnType("int"); - b.Property("ConsecutiveClassWeight") - .HasColumnType("int"); + b.Property("ConsecutiveClassWeight") + .HasColumnType("int"); - b.Property("CoursePreferenceWeight") - .HasColumnType("int"); + b.Property("CoursePreferenceWeight") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EarlyPeriodPenalty") - .HasColumnType("int"); + b.Property("EarlyPeriodPenalty") + .HasColumnType("int"); - b.Property("GeneticGenerationCount") - .HasColumnType("int"); + b.Property("GeneticGenerationCount") + .HasColumnType("int"); - b.Property("GeneticMutationRatePercent") - .HasColumnType("int"); + b.Property("GeneticMutationRatePercent") + .HasColumnType("int"); - b.Property("GeneticPopulationSize") - .HasColumnType("int"); + b.Property("GeneticPopulationSize") + .HasColumnType("int"); - b.Property("LatePeriodPenalty") - .HasColumnType("int"); + b.Property("LatePeriodPenalty") + .HasColumnType("int"); - b.Property("RoomCapacityWasteWeight") - .HasColumnType("int"); + b.Property("RoomCapacityWasteWeight") + .HasColumnType("int"); - b.Property("TeacherSameDayWeight") - .HasColumnType("int"); + b.Property("TeacherSameDayWeight") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId") - .IsUnique(); + b.HasIndex("AcademicTermId") + .IsUnique(); - b.ToTable("ScheduleOptimizationSettings"); - }); + b.ToTable("ScheduleOptimizationSettings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "Status"); + b.HasIndex("AcademicTermId", "Status"); - b.HasIndex("AcademicTermId", "Version") - .IsUnique(); + b.HasIndex("AcademicTermId", "Version") + .IsUnique(); - b.ToTable("SchedulePlans"); - }); + b.ToTable("SchedulePlans"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("ActiveAcademicTermId") - .HasColumnType("char(36)"); + b.Property("ActiveAcademicTermId") + .HasColumnType("char(36)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.Property("CompletedSteps") - .HasColumnType("int"); + b.Property("CompletedSteps") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentStep") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("CurrentStep") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("ErrorMessage") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ErrorMessage") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("RequestedByUserId") - .HasColumnType("char(36)"); + b.Property("RequestedByUserId") + .HasColumnType("char(36)"); - b.Property("SchedulePlanId") - .HasColumnType("char(36)"); + b.Property("SchedulePlanId") + .HasColumnType("char(36)"); - b.Property("StartedAt") - .HasColumnType("datetime(6)"); + b.Property("StartedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("TotalSteps") - .HasColumnType("int"); + b.Property("TotalSteps") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("ActiveAcademicTermId") - .IsUnique(); + b.HasIndex("ActiveAcademicTermId") + .IsUnique(); - b.HasIndex("RequestedByUserId"); + b.HasIndex("RequestedByUserId"); - b.HasIndex("SchedulePlanId", "CreatedAt"); + b.HasIndex("SchedulePlanId", "CreatedAt"); - b.HasIndex("Status", "CreatedAt"); + b.HasIndex("Status", "CreatedAt"); - b.ToTable("SchedulePublishJobs"); - }); + b.ToTable("SchedulePublishJobs"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndsAt") - .HasColumnType("time"); + b.Property("EndsAt") + .HasColumnType("time"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("PeriodNumber") - .HasColumnType("int"); + b.Property("PeriodNumber") + .HasColumnType("int"); - b.Property("StartsAt") - .HasColumnType("time"); + b.Property("StartsAt") + .HasColumnType("time"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId", "PeriodNumber") - .IsUnique(); + b.HasIndex("AcademicTermId", "PeriodNumber") + .IsUnique(); - b.ToTable("ScheduleTimeSlots"); - }); + b.ToTable("ScheduleTimeSlots"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AdministrativeClassId") - .HasColumnType("char(36)"); + b.Property("AdministrativeClassId") + .HasColumnType("char(36)"); - b.Property("ArchiveReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.Property("Biography") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Biography") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CurrentAddress") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("CurrentAddress") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("DateOfBirth") - .HasColumnType("date"); + b.Property("DateOfBirth") + .HasColumnType("date"); - b.Property("Email") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("EmergencyContactName") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("EmergencyContactName") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("EmergencyContactPhone") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("EmergencyContactPhone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("EmergencyContactRelationship") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("EmergencyContactRelationship") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("EnglishName") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("EnglishName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("EnrollmentDate") - .HasColumnType("date"); + b.Property("EnrollmentDate") + .HasColumnType("date"); - b.Property("EnrollmentYear") - .HasColumnType("int"); + b.Property("EnrollmentYear") + .HasColumnType("int"); - b.Property("Ethnicity") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Ethnicity") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("Gender") - .HasColumnType("int"); + b.Property("Gender") + .HasColumnType("int"); - b.Property("HouseholdAddress") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("HouseholdAddress") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("IdCardNumber") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("IdCardNumber") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("IsArchived") - .IsConcurrencyToken() - .HasColumnType("tinyint(1)"); + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("Nationality") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("Nationality") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("NativePlace") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("NativePlace") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Phone") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("PoliticalStatus") - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.Property("PoliticalStatus") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("PostalCode") - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("PostalCode") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("Qq") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("Qq") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("SpecialNeeds") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("SpecialNeeds") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("SpecialTags") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("SpecialTags") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Status") + .HasColumnType("int"); - b.Property("StudentNumber") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("StudentNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("WeChat") - .HasMaxLength(60) - .HasColumnType("varchar(60)"); + b.Property("WeChat") + .HasMaxLength(60) + .HasColumnType("varchar(60)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("EnrollmentYear"); + b.HasIndex("EnrollmentYear"); - b.HasIndex("IsArchived"); + b.HasIndex("IsArchived"); - b.HasIndex("StudentNumber") - .IsUnique(); + b.HasIndex("StudentNumber") + .IsUnique(); - b.HasIndex("UserId"); + b.HasIndex("UserId"); - b.HasIndex("AdministrativeClassId", "Status"); + b.HasIndex("AdministrativeClassId", "Status"); - b.ToTable("Students"); - }); + b.ToTable("Students"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AverageScore") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CourseCount") - .HasColumnType("int"); + b.Property("CourseCount") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Gpa") - .HasPrecision(4, 2) - .HasColumnType("decimal(4,2)"); + b.Property("Gpa") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeightedAverageScore") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("WeightedAverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CalculatedAt"); + b.HasIndex("CalculatedAt"); - b.HasIndex("StudentId") - .IsUnique(); + b.HasIndex("StudentId") + .IsUnique(); - b.ToTable("StudentAcademicStatistics"); - }); + b.ToTable("StudentAcademicStatistics"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("AverageScore") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("AverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.Property("CourseCount") - .HasColumnType("int"); + b.Property("CourseCount") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Gpa") - .HasPrecision(4, 2) - .HasColumnType("decimal(4,2)"); + b.Property("Gpa") + .HasPrecision(4, 2) + .HasColumnType("decimal(4,2)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("WeightedAverageScore") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("WeightedAverageScore") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("AcademicTermId"); + b.HasIndex("AcademicTermId"); - b.HasIndex("StudentId", "AcademicTermId") - .IsUnique(); + b.HasIndex("StudentId", "AcademicTermId") + .IsUnique(); - b.ToTable("StudentAcademicTermStatistics"); - }); + b.ToTable("StudentAcademicTermStatistics"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentLeave", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("DischargeDate") - .HasColumnType("date"); + b.Property("EndAt") + .HasColumnType("datetime(6)"); - b.Property("EnlistmentChangeId") - .HasColumnType("char(36)"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReportedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("ReportedByUserId") - .HasColumnType("char(36)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StartAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("Status") + .HasColumnType("int"); - b.HasKey("Id"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.HasIndex("EnlistmentChangeId"); + b.Property("Type") + .HasColumnType("int"); - b.HasIndex("StudentId", "ReportedAt"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("StudentMilitaryDischargeReports"); - }); + b.HasKey("Id"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasIndex("Status", "CreatedAt"); - b.Property("AffectedTermId") - .HasColumnType("char(36)"); + b.HasIndex("StudentId", "CreatedAt"); - b.Property("ApprovedAt") - .HasColumnType("datetime(6)"); + b.ToTable("StudentLeaves"); + }); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("DischargeDate") - .HasColumnType("date"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("OriginalClassId") - .HasColumnType("char(36)"); + b.Property("DischargeDate") + .HasColumnType("date"); - b.Property("OriginalStatus") - .HasColumnType("int"); + b.Property("EnlistmentChangeId") + .HasColumnType("char(36)"); - b.Property("Reason") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReceivingCollegeId") - .HasColumnType("char(36)"); + b.Property("ReportedAt") + .HasColumnType("datetime(6)"); - b.Property("ReceivingCollegeReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ReportedByUserId") + .HasColumnType("char(36)"); - b.Property("ReceivingCollegeReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("ReceivingCollegeReviewerId") - .HasColumnType("char(36)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.HasKey("Id"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("EnlistmentChangeId"); - b.Property("ServiceStartDate") - .HasColumnType("date"); + b.HasIndex("StudentId", "ReportedAt"); - b.Property("State") - .IsConcurrencyToken() - .HasColumnType("int"); + b.ToTable("StudentMilitaryDischargeReports"); + }); - b.Property("StudentId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("AffectedTermId") + .HasColumnType("char(36)"); - b.Property("SubmittedByUserId") - .HasColumnType("char(36)"); + b.Property("ApprovedAt") + .HasColumnType("datetime(6)"); - b.Property("TargetClassId") - .HasColumnType("char(36)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("TargetStatus") - .HasColumnType("int"); + b.Property("DischargeDate") + .HasColumnType("date"); - b.Property("Type") - .HasColumnType("int"); + b.Property("OriginalClassId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("OriginalStatus") + .HasColumnType("int"); - b.HasKey("Id"); + b.Property("Reason") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.HasIndex("AffectedTermId"); + b.Property("ReceivingCollegeId") + .HasColumnType("char(36)"); - b.HasIndex("OriginalClassId"); + b.Property("ReceivingCollegeReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.HasIndex("TargetClassId"); + b.Property("ReceivingCollegeReviewedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("StudentId", "State"); + b.Property("ReceivingCollegeReviewerId") + .HasColumnType("char(36)"); - b.ToTable("StudentStatusChanges"); - }); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("ServiceStartDate") + .HasColumnType("date"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("State") + .IsConcurrencyToken() + .HasColumnType("int"); - b.Property("StudentStatusChangeId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedByUserId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.Property("TargetClassId") + .HasColumnType("char(36)"); - b.HasIndex("StudentStatusChangeId"); + b.Property("TargetStatus") + .HasColumnType("int"); - b.HasIndex("TeachingTaskId"); + b.Property("Type") + .HasColumnType("int"); - b.HasIndex("StudentId", "TeachingTaskId") - .IsUnique(); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("StudentStatusChangeCourseEffects"); - }); + b.HasKey("Id"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasIndex("AffectedTermId"); - b.Property("ActorUserId") - .HasColumnType("char(36)"); + b.HasIndex("OriginalClassId"); - b.Property("Comment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.HasIndex("TargetClassId"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("StudentId", "State"); - b.Property("FromState") - .HasColumnType("int"); + b.ToTable("StudentStatusChanges"); + }); - b.Property("OccurredAt") - .HasColumnType("datetime(6)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("StudentStatusChangeId") - .HasColumnType("char(36)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ToState") - .HasColumnType("int"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.HasIndex("StudentStatusChangeId", "OccurredAt"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("StudentStatusChangeEvents"); - }); + b.HasKey("Id"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasIndex("StudentStatusChangeId"); - b.Property("CancelledAt") - .HasColumnType("datetime(6)"); + b.HasIndex("TeachingTaskId"); - b.Property("CancelledByUserId") - .HasColumnType("char(36)"); + b.HasIndex("StudentId", "TeachingTaskId") + .IsUnique(); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("StudentStatusChangeCourseEffects"); + }); - b.Property("ExperimentBookingId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ExperimentSessionId") - .HasColumnType("char(36)"); + b.Property("ActorUserId") + .HasColumnType("char(36)"); - b.Property("Reason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Comment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("StudentStatusChangeId") - .HasColumnType("char(36)"); + b.Property("FromState") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("OccurredAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); - b.HasIndex("ExperimentBookingId"); + b.Property("ToState") + .HasColumnType("int"); - b.HasIndex("ExperimentSessionId"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("StudentId"); + b.HasKey("Id"); - b.HasIndex("StudentStatusChangeId", "ExperimentBookingId") - .IsUnique(); + b.HasIndex("StudentStatusChangeId", "OccurredAt"); - b.ToTable("StudentStatusChangeExperimentEffects"); - }); + b.ToTable("StudentStatusChangeEvents"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("CancelledAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("CancelledByUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("ExperimentBookingId") + .HasColumnType("char(36)"); - b.Property("OriginalGradeRecordId") - .HasColumnType("char(36)"); + b.Property("ExperimentSessionId") + .HasColumnType("char(36)"); - b.Property("SnapshotJson") - .IsRequired() - .HasColumnType("longtext"); + b.Property("Reason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("StudentStatusChangeId") - .HasColumnType("char(36)"); + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("Id"); - b.HasKey("Id"); + b.HasIndex("ExperimentBookingId"); - b.HasIndex("GradeSheetId"); + b.HasIndex("ExperimentSessionId"); - b.HasIndex("TeachingTaskId"); + b.HasIndex("StudentId"); - b.HasIndex("StudentId", "TeachingTaskId"); + b.HasIndex("StudentStatusChangeId", "ExperimentBookingId") + .IsUnique(); - b.HasIndex("StudentStatusChangeId", "OriginalGradeRecordId") - .IsUnique(); + b.ToTable("StudentStatusChangeExperimentEffects"); + }); - b.ToTable("StudentStatusChangeGradeArchives"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchiveReason") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.Property("ArchivedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ArchivedByUserId") - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.Property("OriginalGradeRecordId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("SnapshotJson") + .IsRequired() + .HasColumnType("longtext"); - b.Property("Email") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("Gender") - .HasColumnType("int"); + b.Property("StudentStatusChangeId") + .HasColumnType("char(36)"); - b.Property("HireDate") - .HasColumnType("date"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("IsArchived") - .IsConcurrencyToken() - .HasColumnType("tinyint(1)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("IsExternal") - .HasColumnType("tinyint(1)"); + b.HasKey("Id"); - b.Property("Name") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + b.HasIndex("GradeSheetId"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.HasIndex("TeachingTaskId"); - b.Property("Phone") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.HasIndex("StudentId", "TeachingTaskId"); - b.Property("Status") - .HasColumnType("int"); + b.HasIndex("StudentStatusChangeId", "OriginalGradeRecordId") + .IsUnique(); - b.Property("TeacherNumber") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.ToTable("StudentStatusChangeGradeArchives"); + }); - b.Property("Title") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("ArchiveReason") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("ArchivedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("ArchivedByUserId") + .HasColumnType("char(36)"); - b.HasIndex("IsArchived"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.HasIndex("TeacherNumber") - .IsUnique(); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("UserId"); + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.HasIndex("CollegeId", "Status"); + b.Property("Gender") + .HasColumnType("int"); - b.ToTable("Teachers"); - }); + b.Property("HireDate") + .HasColumnType("date"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("IsArchived") + .IsConcurrencyToken() + .HasColumnType("tinyint(1)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("IsExternal") + .HasColumnType("tinyint(1)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ReviewComment") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Phone") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("Status") + .HasColumnType("int"); - b.Property("ReviewedByUserId") - .HasColumnType("char(36)"); + b.Property("TeacherNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("Statement") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Title") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("IsArchived"); - b.HasKey("Id"); + b.HasIndex("TeacherNumber") + .IsUnique(); - b.HasIndex("CourseId"); + b.HasIndex("UserId"); - b.HasIndex("ReviewedByUserId"); + b.HasIndex("CollegeId", "Status"); - b.HasIndex("TeacherId"); + b.ToTable("Teachers"); + }); - b.HasIndex("Status", "AcademicTermId"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("AcademicTermId", "TeacherId", "CourseId") - .IsUnique(); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.ToTable("TeacherCourseApplications"); - }); + b.Property("CourseId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("ReviewComment") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("Actions") - .IsRequired() - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("ReviewedByUserId") + .HasColumnType("char(36)"); - b.Property("DueDate") - .HasColumnType("date"); + b.Property("Statement") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ProblemSummary") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("Status") + .HasColumnType("int"); - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("CourseId"); - b.HasKey("Id"); + b.HasIndex("ReviewedByUserId"); - b.HasIndex("TeacherId"); + b.HasIndex("TeacherId"); - b.HasIndex("TeachingTaskId", "TeacherId") - .IsUnique(); + b.HasIndex("Status", "AcademicTermId"); - b.HasIndex("AcademicTermId", "TeacherId", "Status"); + b.HasIndex("AcademicTermId", "TeacherId", "CourseId") + .IsUnique(); - b.ToTable("TeachingImprovementPlans"); - }); + b.ToTable("TeacherCourseApplications"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Comment") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("Actions") + .IsRequired() + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("IsApproved") - .HasColumnType("tinyint(1)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ReviewedAt") - .HasColumnType("datetime(6)"); + b.Property("DueDate") + .HasColumnType("date"); - b.Property("ReviewerUserId") - .HasColumnType("char(36)"); + b.Property("ProblemSummary") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("TeachingImprovementPlanId") - .HasColumnType("char(36)"); + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.HasIndex("TeachingImprovementPlanId", "ReviewedAt"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.ToTable("TeachingImprovementReviews"); - }); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("TeacherId"); - b.Property("Kind") - .HasColumnType("int"); + b.HasIndex("TeachingTaskId", "TeacherId") + .IsUnique(); - b.Property("Message") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.HasIndex("AcademicTermId", "TeacherId", "Status"); - b.Property("SentAt") - .HasColumnType("datetime(6)"); + b.ToTable("TeachingImprovementPlans"); + }); - b.Property("SentByUserId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("Comment") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("IsApproved") + .HasColumnType("tinyint(1)"); - b.HasIndex("TeachingTaskId", "Kind", "SentAt"); + b.Property("ReviewedAt") + .HasColumnType("datetime(6)"); - b.ToTable("TeachingMonitoringReminders"); - }); + b.Property("ReviewerUserId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("TeachingImprovementPlanId") + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("Id"); - b.Property("ExperimentGradeDeadline") - .HasColumnType("datetime(6)"); + b.HasIndex("TeachingImprovementPlanId", "ReviewedAt"); - b.Property("GradeDeadline") - .HasColumnType("datetime(6)"); + b.ToTable("TeachingImprovementReviews"); + }); - b.Property("ReminderCooldownHours") - .HasColumnType("int"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("Kind") + .HasColumnType("int"); - b.HasIndex("AcademicTermId") - .IsUnique(); + b.Property("Message") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.ToTable("TeachingMonitoringSettings"); - }); + b.Property("SentAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("SentByUserId") + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("EvaluatorUserId") - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("Issues") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.HasIndex("TeachingTaskId", "Kind", "SentAt"); - b.Property("Recommendation") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.ToTable("TeachingMonitoringReminders"); + }); - b.Property("Score") - .HasColumnType("int"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Source") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("Strengths") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("SubmittedAt") - .HasColumnType("datetime(6)"); + b.Property("ExperimentGradeDeadline") + .HasColumnType("datetime(6)"); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("GradeDeadline") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("ReminderCooldownHours") + .HasColumnType("int"); - b.HasKey("Id"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("AcademicTermId", "TeachingTaskId", "Source"); + b.HasKey("Id"); - b.HasIndex("TeachingTaskId", "EvaluatorUserId", "Source") - .IsUnique(); + b.HasIndex("AcademicTermId") + .IsUnique(); - b.ToTable("TeachingObservationEvaluations"); - }); + b.ToTable("TeachingMonitoringSettings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("Capacity") - .HasColumnType("int"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CourseId") - .HasColumnType("char(36)"); + b.Property("EvaluatorUserId") + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("Issues") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("EndWeek") - .HasColumnType("int"); + b.Property("Recommendation") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("GenerationBatchCode") - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("Score") + .HasColumnType("int"); - b.Property("Name") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Source") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("Notes") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Strengths") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.Property("SubmittedAt") + .HasColumnType("datetime(6)"); - b.Property("SchedulingMode") - .HasColumnType("int"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("StartWeek") - .HasColumnType("int"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.HasKey("Id"); - b.Property("TaskNumber") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.HasIndex("AcademicTermId", "TeachingTaskId", "Source"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("TeachingTaskId", "EvaluatorUserId", "Source") + .IsUnique(); - b.Property("WeeklyHours") - .HasColumnType("int"); + b.ToTable("TeachingObservationEvaluations"); + }); - b.HasKey("Id"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("CourseId"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.HasIndex("TaskNumber") - .IsUnique(); + b.Property("Capacity") + .HasColumnType("int"); - b.HasIndex("AcademicTermId", "Status"); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.ToTable("TeachingTasks"); - }); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => - { - b.Property("TeachingTaskScheduleConstraintId") - .HasColumnType("char(36)"); + b.Property("EndWeek") + .HasColumnType("int"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("GenerationBatchCode") + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.HasIndex("ClassroomId"); + b.Property("Notes") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.ToTable("TeachingTaskAllowedClassrooms"); - }); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => - { - b.Property("TeachingTaskScheduleConstraintId") - .HasColumnType("char(36)"); + b.Property("SchedulingMode") + .HasColumnType("int"); - b.Property("ClassroomId") - .HasColumnType("char(36)"); + b.Property("StartWeek") + .HasColumnType("int"); - b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); + b.Property("Status") + .HasColumnType("int"); - b.HasIndex("ClassroomId"); + b.Property("TaskNumber") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.ToTable("TeachingTaskAllowedExperimentClassrooms"); - }); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => - { - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("WeeklyHours") + .HasColumnType("int"); - b.Property("AdministrativeClassId") - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.HasKey("TeachingTaskId", "AdministrativeClassId"); + b.HasIndex("CourseId"); - b.HasIndex("AdministrativeClassId"); + b.HasIndex("TaskNumber") + .IsUnique(); - b.ToTable("TeachingTaskClasses"); - }); + b.HasIndex("AcademicTermId", "Status"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.ToTable("TeachingTasks"); + }); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => + { + b.Property("TeachingTaskScheduleConstraintId") + .HasColumnType("char(36)"); - b.Property("Label") - .IsRequired() - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("LowerBound") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); - b.Property("SortOrder") - .HasColumnType("int"); + b.HasIndex("ClassroomId"); - b.Property("StudentCount") - .HasColumnType("int"); + b.ToTable("TeachingTaskAllowedClassrooms"); + }); - b.Property("TeachingTaskGradeStatisticId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => + { + b.Property("TeachingTaskScheduleConstraintId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("ClassroomId") + .HasColumnType("char(36)"); - b.Property("UpperBound") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.HasKey("TeachingTaskScheduleConstraintId", "ClassroomId"); - b.HasKey("Id"); + b.HasIndex("ClassroomId"); - b.HasIndex("TeachingTaskGradeStatisticId", "SortOrder") - .IsUnique(); + b.ToTable("TeachingTaskAllowedExperimentClassrooms"); + }); - b.ToTable("TeachingTaskGradeScoreBands"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => + { + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("AdministrativeClassId") + .HasColumnType("char(36)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.HasKey("TeachingTaskId", "AdministrativeClassId"); - b.Property("AverageScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.HasIndex("AdministrativeClassId"); - b.Property("CalculatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("TeachingTaskClasses"); + }); - b.Property("CourseId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("ExcellentCount") - .HasColumnType("int"); + b.Property("Label") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.Property("ExcellentRate") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("LowerBound") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("GradeSheetId") - .HasColumnType("char(36)"); + b.Property("SortOrder") + .HasColumnType("int"); - b.Property("HighestScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("StudentCount") + .HasColumnType("int"); - b.Property("LowestScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("TeachingTaskGradeStatisticId") + .HasColumnType("char(36)"); - b.Property("MedianScore") - .HasPrecision(5, 1) - .HasColumnType("decimal(5,1)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("PassRate") - .HasPrecision(5, 2) - .HasColumnType("decimal(5,2)"); + b.Property("UpperBound") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("PassedCount") - .HasColumnType("int"); + b.HasKey("Id"); - b.Property("StandardDeviation") - .HasPrecision(6, 2) - .HasColumnType("decimal(6,2)"); + b.HasIndex("TeachingTaskGradeStatisticId", "SortOrder") + .IsUnique(); - b.Property("StudentCount") - .HasColumnType("int"); + b.ToTable("TeachingTaskGradeScoreBands"); + }); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.HasKey("Id"); + b.Property("AverageScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.HasIndex("AcademicTermId"); + b.Property("CalculatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("GradeSheetId") - .IsUnique(); + b.Property("CourseId") + .HasColumnType("char(36)"); - b.HasIndex("TeachingTaskId") - .IsUnique(); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("CourseId", "AcademicTermId"); + b.Property("ExcellentCount") + .HasColumnType("int"); - b.ToTable("TeachingTaskGradeStatistics"); - }); + b.Property("ExcellentRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("GradeSheetId") + .HasColumnType("char(36)"); - b.Property("AllowedDayOfWeeks") - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("HighestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("AllowedExperimentVenueNatures") - .HasColumnType("int"); + b.Property("LowestScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("MedianScore") + .HasPrecision(5, 1) + .HasColumnType("decimal(5,1)"); - b.Property("EarliestPeriod") - .HasColumnType("int"); + b.Property("PassRate") + .HasPrecision(5, 2) + .HasColumnType("decimal(5,2)"); - b.Property("ExperimentRequiredBuildingId") - .HasColumnType("char(36)"); + b.Property("PassedCount") + .HasColumnType("int"); - b.Property("ExperimentRequiredCampusId") - .HasColumnType("char(36)"); + b.Property("StandardDeviation") + .HasPrecision(6, 2) + .HasColumnType("decimal(6,2)"); - b.Property("LatestPeriod") - .HasColumnType("int"); + b.Property("StudentCount") + .HasColumnType("int"); - b.Property("PreferredDayOfWeeks") - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("PreferredEarliestPeriod") - .HasColumnType("int"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("PreferredLatestPeriod") - .HasColumnType("int"); + b.HasKey("Id"); - b.Property("RequiredBuildingId") - .HasColumnType("char(36)"); + b.HasIndex("AcademicTermId"); - b.Property("RequiredCampusId") - .HasColumnType("char(36)"); + b.HasIndex("GradeSheetId") + .IsUnique(); - b.Property("RequiresClassroom") - .HasColumnType("tinyint(1)"); + b.HasIndex("TeachingTaskId") + .IsUnique(); - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.HasIndex("CourseId", "AcademicTermId"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("TeachingTaskGradeStatistics"); + }); - b.HasKey("Id"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("ExperimentRequiredBuildingId"); + b.Property("AllowedDayOfWeeks") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.HasIndex("ExperimentRequiredCampusId"); + b.Property("AllowedExperimentVenueNatures") + .HasColumnType("int"); - b.HasIndex("RequiredBuildingId"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("RequiredCampusId"); + b.Property("EarliestPeriod") + .HasColumnType("int"); - b.HasIndex("TeachingTaskId") - .IsUnique(); + b.Property("ExperimentRequiredBuildingId") + .HasColumnType("char(36)"); - b.ToTable("TeachingTaskScheduleConstraints"); - }); + b.Property("ExperimentRequiredCampusId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => - { - b.Property("TeachingTaskId") - .HasColumnType("char(36)"); + b.Property("LatestPeriod") + .HasColumnType("int"); - b.Property("TeacherId") - .HasColumnType("char(36)"); + b.Property("PreferredDayOfWeeks") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("IsPrimary") - .HasColumnType("tinyint(1)"); + b.Property("PreferredEarliestPeriod") + .HasColumnType("int"); - b.HasKey("TeachingTaskId", "TeacherId"); + b.Property("PreferredLatestPeriod") + .HasColumnType("int"); - b.HasIndex("TeacherId"); + b.Property("RequiredBuildingId") + .HasColumnType("char(36)"); - b.ToTable("TeachingTaskTeachers"); - }); + b.Property("RequiredCampusId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("RequiresClassroom") + .HasColumnType("tinyint(1)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("AccommodationFee") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("AccommodationPaid") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.HasKey("Id"); - b.Property("AdjustmentPaid") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.HasIndex("ExperimentRequiredBuildingId"); - b.Property("BasePaid") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.HasIndex("ExperimentRequiredCampusId"); - b.Property("BaseTuition") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.HasIndex("RequiredBuildingId"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("RequiredCampusId"); - b.Property("CreditCount") - .HasPrecision(8, 2) - .HasColumnType("decimal(8,2)"); + b.HasIndex("TeachingTaskId") + .IsUnique(); - b.Property("CreditFee") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.ToTable("TeachingTaskScheduleConstraints"); + }); - b.Property("CreditPaid") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => + { + b.Property("TeachingTaskId") + .HasColumnType("char(36)"); - b.Property("ReconciliationAdjustment") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("TeacherId") + .HasColumnType("char(36)"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("IsPrimary") + .HasColumnType("tinyint(1)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("TeachingTaskId", "TeacherId"); - b.HasKey("Id"); + b.HasIndex("TeacherId"); - b.HasIndex("StudentId"); + b.ToTable("TeachingTaskTeachers"); + }); - b.HasIndex("AcademicTermId", "StudentId") - .IsUnique(); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.ToTable("TuitionBills"); - }); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("AccommodationFee") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("Amount") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + b.Property("AccommodationPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("ConfirmedAt") - .HasColumnType("datetime(6)"); + b.Property("AdjustmentPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("ConfirmedByUserId") - .HasColumnType("char(36)"); + b.Property("BasePaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("BaseTuition") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("Item") - .HasColumnType("int"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Method") - .HasColumnType("int"); + b.Property("CreditCount") + .HasPrecision(8, 2) + .HasColumnType("decimal(8,2)"); - b.Property("ReferenceNumber") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("CreditFee") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("TuitionBillId") - .HasColumnType("char(36)"); + b.Property("CreditPaid") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("ReconciliationAdjustment") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.HasKey("Id"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.HasIndex("TuitionBillId", "Item", "CreatedAt"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("TuitionPayments"); - }); + b.HasKey("Id"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasIndex("StudentId"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.HasIndex("AcademicTermId", "StudentId") + .IsUnique(); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("TuitionBills"); + }); - b.Property("CreditUnitPrice") - .HasPrecision(10, 2) - .HasColumnType("decimal(10,2)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("CreditsLockedAt") - .HasColumnType("datetime(6)"); + b.Property("Amount") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("CreditsLockedByUserId") - .HasColumnType("char(36)"); + b.Property("ConfirmedAt") + .HasColumnType("datetime(6)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("ConfirmedByUserId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("Item") + .HasColumnType("int"); - b.HasIndex("AcademicTermId") - .IsUnique(); + b.Property("Method") + .HasColumnType("int"); - b.ToTable("TuitionTermSettings"); - }); + b.Property("ReferenceNumber") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.VenueDisplayAnnouncement", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("TuitionBillId") + .HasColumnType("char(36)"); - b.Property("Content") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("Id"); - b.Property("EndsAt") - .HasColumnType("datetime(6)"); + b.HasIndex("TuitionBillId", "Item", "CreatedAt"); - b.Property("IsPinned") - .HasColumnType("tinyint(1)"); + b.ToTable("TuitionPayments"); + }); - b.Property("IsPublished") - .HasColumnType("tinyint(1)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("IsUrgent") - .HasColumnType("tinyint(1)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("Priority") - .HasColumnType("int"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Scope") - .HasColumnType("int"); + b.Property("CreditUnitPrice") + .HasPrecision(10, 2) + .HasColumnType("decimal(10,2)"); - b.Property("StartsAt") - .HasColumnType("datetime(6)"); + b.Property("CreditsLockedAt") + .HasColumnType("datetime(6)"); - b.Property("TargetId") - .HasColumnType("char(36)"); + b.Property("CreditsLockedByUserId") + .HasColumnType("char(36)"); - b.Property("Title") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.Property("Status") + .HasColumnType("int"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("IsPublished", "StartsAt", "EndsAt"); + b.HasIndex("AcademicTermId") + .IsUnique(); - b.HasIndex("Scope", "TargetId", "IsPublished"); + b.ToTable("TuitionTermSettings"); + }); - b.ToTable("VenueDisplayAnnouncements"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.VenueDisplayAnnouncement", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("Content") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("AcknowledgeComment") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("EndsAt") + .HasColumnType("datetime(6)"); - b.Property("AcknowledgedAt") - .HasColumnType("datetime(6)"); + b.Property("IsPinned") + .HasColumnType("tinyint(1)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); - b.Property("Detail") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("IsUrgent") + .HasColumnType("tinyint(1)"); - b.Property("Status") - .HasColumnType("int"); + b.Property("Priority") + .HasColumnType("int"); - b.Property("StudentId") - .HasColumnType("char(36)"); + b.Property("Scope") + .HasColumnType("int"); - b.Property("TriggerValue") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.Property("StartsAt") + .HasColumnType("datetime(6)"); - b.Property("Type") - .HasColumnType("int"); + b.Property("TargetId") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("Title") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.HasKey("Id"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("Status"); + b.HasKey("Id"); - b.HasIndex("StudentId", "AcademicTermId", "Type") - .IsUnique(); + b.HasIndex("IsPublished", "StartsAt", "EndsAt"); - b.ToTable("WarningRecords"); - }); + b.HasIndex("Scope", "TargetId", "IsPublished"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.ToTable("VenueDisplayAnnouncements"); + }); - b.Property("AcademicTermId") - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("AutoCheckEnabled") - .HasColumnType("tinyint(1)"); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.Property("CheckDayOfWeek") - .HasColumnType("int"); + b.Property("AcknowledgeComment") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("CheckHour") - .HasColumnType("int"); + b.Property("AcknowledgedAt") + .HasColumnType("datetime(6)"); - b.Property("CheckMinute") - .HasColumnType("int"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("Detail") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("Description") - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("Status") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("StudentId") + .HasColumnType("char(36)"); - b.Property("LastCheckAt") - .HasColumnType("datetime(6)"); + b.Property("TriggerValue") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Type") + .HasColumnType("int"); - b.Property("NotifyCounselor") - .HasColumnType("tinyint(1)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("NotifyStudent") - .HasColumnType("tinyint(1)"); + b.HasKey("Id"); - b.Property("Threshold") - .HasPrecision(7, 2) - .HasColumnType("decimal(7,2)"); + b.HasIndex("Status"); - b.Property("Type") - .HasColumnType("int"); + b.HasIndex("StudentId", "AcademicTermId", "Type") + .IsUnique(); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("WarningRecords"); + }); - b.HasKey("Id"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("AcademicTermId", "Type") - .IsUnique(); + b.Property("AcademicTermId") + .HasColumnType("char(36)"); - b.ToTable("WarningRules"); - }); + b.Property("AutoCheckEnabled") + .HasColumnType("tinyint(1)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("CheckDayOfWeek") + .HasColumnType("int"); - b.Property("Auth") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("CheckHour") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CheckMinute") + .HasColumnType("int"); - b.Property("Endpoint") - .IsRequired() - .HasColumnType("text"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("EndpointHash") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("Description") + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("ExpiresAt") - .HasColumnType("datetime(6)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("LastSeenAt") - .HasColumnType("datetime(6)"); + b.Property("LastCheckAt") + .HasColumnType("datetime(6)"); - b.Property("P256dh") - .IsRequired() - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("NotifyCounselor") + .HasColumnType("tinyint(1)"); - b.Property("UserAgent") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("NotifyStudent") + .HasColumnType("tinyint(1)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("Threshold") + .HasPrecision(7, 2) + .HasColumnType("decimal(7,2)"); - b.HasKey("Id"); + b.Property("Type") + .HasColumnType("int"); - b.HasIndex("EndpointHash") - .IsUnique(); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("UserId", "LastSeenAt"); + b.HasKey("Id"); - b.ToTable("WebPushSubscriptions"); - }); + b.HasIndex("AcademicTermId", "Type") + .IsUnique(); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationRole", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.ToTable("WarningRules"); + }); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("DataScope") - .HasColumnType("int"); + b.Property("Auth") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Description") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.Property("Endpoint") + .IsRequired() + .HasColumnType("text"); - b.Property("NormalizedName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.Property("EndpointHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.HasKey("Id"); + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); - b.HasIndex("NormalizedName") - .IsUnique() - .HasDatabaseName("RoleNameIndex"); + b.Property("LastSeenAt") + .HasColumnType("datetime(6)"); - b.ToTable("AspNetRoles", (string)null); - }); + b.Property("P256dh") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationUser", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("AccessFailedCount") - .HasColumnType("int"); + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("CalendarSubscriptionCreatedAt") - .HasColumnType("datetime(6)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("CalendarSubscriptionStamp") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.HasKey("Id"); - b.Property("CollegeId") - .HasColumnType("char(36)"); + b.HasIndex("EndpointHash") + .IsUnique(); - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasColumnType("longtext"); + b.HasIndex("UserId", "LastSeenAt"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("WebPushSubscriptions"); + }); - b.Property("DisplayName") - .IsRequired() - .HasMaxLength(50) - .HasColumnType("varchar(50)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationRole", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Email") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); - b.Property("EmailConfirmed") - .HasColumnType("tinyint(1)"); + b.Property("DataScope") + .HasColumnType("int"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("Description") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("LastLoginAt") - .HasColumnType("datetime(6)"); + b.Property("Name") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("LockoutEnabled") - .HasColumnType("tinyint(1)"); + b.Property("NormalizedName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("LockoutEnd") - .HasColumnType("datetime"); + b.HasKey("Id"); - b.Property("NormalizedEmail") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.HasIndex("NormalizedName") + .IsUnique() + .HasDatabaseName("RoleNameIndex"); - b.Property("NormalizedUserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.ToTable("AspNetRoles"); + }); - b.Property("PasswordHash") - .HasColumnType("longtext"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.ApplicationUser", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("PhoneNumber") - .HasColumnType("longtext"); + b.Property("AccessFailedCount") + .HasColumnType("int"); - b.Property("PhoneNumberConfirmed") - .HasColumnType("tinyint(1)"); + b.Property("CalendarSubscriptionCreatedAt") + .HasColumnType("datetime(6)"); - b.Property("SecurityStamp") - .HasColumnType("longtext"); + b.Property("CalendarSubscriptionStamp") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("StaffNumber") - .HasMaxLength(30) - .HasColumnType("varchar(30)"); + b.Property("CollegeId") + .HasColumnType("char(36)"); - b.Property("TwoFactorEnabled") - .HasColumnType("tinyint(1)"); + b.Property("ConcurrencyStamp") + .IsConcurrencyToken() + .HasColumnType("longtext"); - b.Property("UserName") - .HasMaxLength(256) - .HasColumnType("varchar(256)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("DisplayName") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.HasIndex("NormalizedEmail") - .HasDatabaseName("EmailIndex"); + b.Property("Email") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.HasIndex("NormalizedUserName") - .IsUnique() - .HasDatabaseName("UserNameIndex"); + b.Property("EmailConfirmed") + .HasColumnType("tinyint(1)"); - b.HasIndex("StaffNumber"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.ToTable("AspNetUsers", (string)null); - }); + b.Property("LastLoginAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCeremonyState", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("LockoutEnabled") + .HasColumnType("tinyint(1)"); - b.Property("ConsumedAt") - .HasColumnType("datetime(6)"); + b.Property("LockoutEnd") + .HasColumnType("datetime"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("NormalizedEmail") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("ExpiresAt") - .HasColumnType("datetime(6)"); + b.Property("NormalizedUserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("PayloadJson") - .IsRequired() - .HasColumnType("longtext"); + b.Property("PasswordHash") + .HasColumnType("longtext"); - b.Property("TokenHash") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("PhoneNumber") + .HasColumnType("longtext"); - b.HasKey("Id"); + b.Property("PhoneNumberConfirmed") + .HasColumnType("tinyint(1)"); - b.HasIndex("ExpiresAt"); + b.Property("SecurityStamp") + .HasColumnType("longtext"); - b.HasIndex("TokenHash") - .IsUnique(); + b.Property("StaffNumber") + .HasMaxLength(30) + .HasColumnType("varchar(30)"); - b.ToTable("PasskeyCeremonyStates"); - }); + b.Property("TwoFactorEnabled") + .HasColumnType("tinyint(1)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("UserName") + .HasMaxLength(256) + .HasColumnType("varchar(256)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("Id"); - b.Property("CredentialId") - .IsRequired() - .HasMaxLength(2048) - .HasColumnType("varchar(2048)"); + b.HasIndex("NormalizedEmail") + .HasDatabaseName("EmailIndex"); - b.Property("CredentialIdHash") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.HasIndex("NormalizedUserName") + .IsUnique() + .HasDatabaseName("UserNameIndex"); - b.Property("FriendlyName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.HasIndex("StaffNumber"); - b.Property("IsBackedUp") - .HasColumnType("tinyint(1)"); + b.ToTable("AspNetUsers"); + }); - b.Property("IsBackupEligible") - .HasColumnType("tinyint(1)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCeremonyState", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("LastUsedAt") - .HasColumnType("datetime(6)"); + b.Property("ConsumedAt") + .HasColumnType("datetime(6)"); - b.Property("PublicKey") - .IsRequired() - .HasColumnType("longblob"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("SignatureCounter") - .HasColumnType("int unsigned"); + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); - b.Property("Transports") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("PayloadJson") + .IsRequired() + .HasColumnType("longtext"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("TokenHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("CredentialIdHash") - .IsUnique(); + b.HasIndex("ExpiresAt"); - b.HasIndex("UserId"); + b.HasIndex("TokenHash") + .IsUnique(); - b.ToTable("PasskeyCredentials"); - }); + b.ToTable("PasskeyCeremonyStates"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClientType") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("CredentialId") + .IsRequired() + .HasMaxLength(2048) + .HasColumnType("varchar(2048)"); - b.Property("ExpiresAt") - .HasColumnType("datetime(6)"); + b.Property("CredentialIdHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("LastRefreshedAt") - .HasColumnType("datetime(6)"); + b.Property("FriendlyName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("ReplacedBySessionId") - .HasColumnType("char(36)"); + b.Property("IsBackedUp") + .HasColumnType("tinyint(1)"); - b.Property("RevokedAt") - .HasColumnType("datetime(6)"); + b.Property("IsBackupEligible") + .HasColumnType("tinyint(1)"); - b.Property("SecurityStamp") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("LastUsedAt") + .HasColumnType("datetime(6)"); - b.Property("TokenHash") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("PublicKey") + .IsRequired() + .HasColumnType("longblob"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("SignatureCounter") + .HasColumnType("int unsigned"); - b.HasKey("Id"); + b.Property("Transports") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.HasIndex("TokenHash") - .IsUnique(); + b.Property("UserId") + .HasColumnType("char(36)"); - b.HasIndex("UserId", "ExpiresAt"); + b.HasKey("Id"); - b.ToTable("RefreshSessions"); - }); + b.HasIndex("CredentialIdHash") + .IsUnique(); - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); + b.HasIndex("UserId"); - b.Property("ConfigurationJson") - .IsRequired() - .HasColumnType("text"); + b.ToTable("PasskeyCredentials"); + }); - b.Property("SchemaVersion") - .HasColumnType("int"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("ClientType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.HasKey("UserId"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("UserNavigationPreferences"); - }); + b.Property("ExpiresAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.AppUpdateRelease", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("LastRefreshedAt") + .HasColumnType("datetime(6)"); - b.Property("BundleContent") - .IsRequired() - .HasColumnType("longblob"); + b.Property("ReplacedBySessionId") + .HasColumnType("char(36)"); - b.Property("Channel") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("RevokedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("SecurityStamp") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("CreatedByUserName") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("TokenHash") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("FileName") - .IsRequired() - .HasMaxLength(180) - .HasColumnType("varchar(180)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("FileSize") - .HasColumnType("bigint"); + b.HasKey("Id"); - b.Property("NativeVersion") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.HasIndex("TokenHash") + .IsUnique(); - b.Property("Platform") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.HasIndex("UserId", "ExpiresAt"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.ToTable("RefreshSessions"); + }); - b.Property("PublishedByUserName") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("ReleaseNotes") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.Property("ConfigurationJson") + .IsRequired() + .HasColumnType("text"); - b.Property("Sha256") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("SchemaVersion") + .HasColumnType("int"); - b.Property("Status") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasKey("UserId"); - b.Property("Version") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.ToTable("UserNavigationPreferences"); + }); - b.HasKey("Id"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.AppUpdateRelease", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("CreatedAt"); + b.Property("BundleContent") + .IsRequired() + .HasColumnType("longblob"); - b.HasIndex("Platform", "Channel", "NativeVersion", "Status"); + b.Property("Channel") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.HasIndex("Platform", "Channel", "NativeVersion", "Version") - .IsUnique(); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("AppUpdateReleases"); - }); + b.Property("CreatedByUserName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.AuditLog", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("FileName") + .IsRequired() + .HasMaxLength(180) + .HasColumnType("varchar(180)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("FileSize") + .HasColumnType("bigint"); - b.Property("DurationMilliseconds") - .HasColumnType("bigint"); + b.Property("NativeVersion") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("ErrorType") - .HasMaxLength(200) - .HasColumnType("varchar(200)"); + b.Property("Platform") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("IpAddress") - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.Property("Method") - .IsRequired() - .HasMaxLength(10) - .HasColumnType("varchar(10)"); + b.Property("PublishedByUserName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("Path") - .IsRequired() - .HasMaxLength(300) - .HasColumnType("varchar(300)"); + b.Property("ReleaseNotes") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("RequestId") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Sha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("StatusCode") - .HasColumnType("int"); + b.Property("Status") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserAgent") - .HasMaxLength(500) - .HasColumnType("varchar(500)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("UserName") - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.HasIndex("CreatedAt"); - b.HasKey("Id"); + b.HasIndex("Platform", "Channel", "NativeVersion", "Status"); - b.HasIndex("CreatedAt", "Id"); + b.HasIndex("Platform", "Channel", "NativeVersion", "Version") + .IsUnique(); - b.HasIndex("Method", "CreatedAt"); + b.ToTable("AppUpdateReleases"); + }); - b.HasIndex("StatusCode", "CreatedAt"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.AuditLog", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("UserId", "CreatedAt"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("AuditLogs"); - }); + b.Property("DurationMilliseconds") + .HasColumnType("bigint"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.BackgroundJobOutboxMessage", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("ErrorType") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); - b.Property("CompletedAt") - .HasColumnType("datetime(6)"); + b.Property("IpAddress") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("Method") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)"); - b.Property("JobId") - .HasColumnType("char(36)"); + b.Property("Path") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("varchar(300)"); - b.Property("JobKind") - .HasColumnType("int"); + b.Property("RequestId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("LastError") - .HasMaxLength(2000) - .HasColumnType("varchar(2000)"); + b.Property("StatusCode") + .HasColumnType("int"); - b.Property("LeaseExpiresAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("ProcessingAttempts") - .HasColumnType("int"); + b.Property("UserAgent") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); - b.Property("ProcessingToken") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("PublishAttempts") - .HasColumnType("int"); + b.Property("UserName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("PublishedAt") - .HasColumnType("datetime(6)"); + b.HasKey("Id"); - b.Property("State") - .HasColumnType("int"); + b.HasIndex("CreatedAt", "Id"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("Method", "CreatedAt"); - b.HasKey("Id"); + b.HasIndex("StatusCode", "CreatedAt"); - b.HasIndex("LeaseExpiresAt"); + b.HasIndex("UserId", "CreatedAt"); - b.HasIndex("JobKind", "JobId") - .IsUnique(); + b.ToTable("AuditLogs"); + }); - b.HasIndex("State", "CompletedAt"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.BackgroundJobOutboxMessage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("State", "CreatedAt"); + b.Property("CompletedAt") + .HasColumnType("datetime(6)"); - b.ToTable("BackgroundJobOutboxMessages"); - }); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginInstallation", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("JobId") + .HasColumnType("char(36)"); - b.Property("ChangedByUserId") - .HasMaxLength(450) - .HasColumnType("varchar(450)"); + b.Property("JobKind") + .HasColumnType("int"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("LastError") + .HasMaxLength(2000) + .HasColumnType("varchar(2000)"); - b.Property("InstalledVersion") - .IsRequired() - .HasMaxLength(32) - .HasColumnType("varchar(32)"); + b.Property("LeaseExpiresAt") + .HasColumnType("datetime(6)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("ProcessingAttempts") + .HasColumnType("int"); - b.Property("PluginId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("ProcessingToken") + .HasColumnType("char(36)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("PublishAttempts") + .HasColumnType("int"); - b.HasKey("Id"); + b.Property("PublishedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("PluginId") - .IsUnique(); + b.Property("State") + .HasColumnType("int"); - b.ToTable("PluginInstallations"); - }); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginMigrationHistory", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.HasKey("Id"); - b.Property("AppliedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("LeaseExpiresAt"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.HasIndex("JobKind", "JobId") + .IsUnique(); - b.Property("MigrationId") - .IsRequired() - .HasMaxLength(120) - .HasColumnType("varchar(120)"); + b.HasIndex("State", "CompletedAt"); - b.Property("PluginId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.HasIndex("State", "CreatedAt"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.ToTable("BackgroundJobOutboxMessages"); + }); - b.HasKey("Id"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginInstallation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.HasIndex("PluginId", "MigrationId") - .IsUnique(); + b.Property("ChangedByUserId") + .HasMaxLength(450) + .HasColumnType("varchar(450)"); - b.ToTable("PluginMigrationHistory"); - }); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginPackageRelease", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("InstalledVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("varchar(32)"); - b.Property("ActivationRequestedAt") - .HasColumnType("datetime(6)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.Property("Category") - .IsRequired() - .HasMaxLength(80) - .HasColumnType("varchar(80)"); + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("CreatedByUserId") - .HasMaxLength(450) - .HasColumnType("varchar(450)"); + b.HasKey("Id"); - b.Property("Description") - .IsRequired() - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.HasIndex("PluginId") + .IsUnique(); - b.Property("FailureMessage") - .HasMaxLength(1000) - .HasColumnType("varchar(1000)"); + b.ToTable("PluginInstallations"); + }); - b.Property("HostApiVersion") - .IsRequired() - .HasMaxLength(20) - .HasColumnType("varchar(20)"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginMigrationHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ManifestJson") - .IsRequired() - .HasColumnType("longtext"); + b.Property("AppliedAt") + .HasColumnType("datetime(6)"); - b.Property("Name") - .IsRequired() - .HasMaxLength(160) - .HasColumnType("varchar(160)"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("PackageContent") - .IsRequired() - .HasColumnType("longblob"); + b.Property("MigrationId") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("varchar(120)"); - b.Property("PluginId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.Property("PublisherId") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("Sha256") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("varchar(64)"); + b.HasKey("Id"); - b.Property("Signature") - .IsRequired() - .HasColumnType("longblob"); + b.HasIndex("PluginId", "MigrationId") + .IsUnique(); - b.Property("Status") - .HasColumnType("int"); + b.ToTable("PluginMigrationHistory"); + }); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.PluginPackageRelease", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("Version") - .IsRequired() - .HasMaxLength(40) - .HasColumnType("varchar(40)"); + b.Property("ActivationRequestedAt") + .HasColumnType("datetime(6)"); - b.HasKey("Id"); + b.Property("Category") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("varchar(80)"); - b.HasIndex("PluginId", "Status"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.HasIndex("PluginId", "Version") - .IsUnique(); + b.Property("CreatedByUserId") + .HasMaxLength(450) + .HasColumnType("varchar(450)"); - b.ToTable("PluginPackageReleases"); - }); + b.Property("Description") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - modelBuilder.Entity("Jiaowu.Api.Domain.System.SystemFeatureSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("char(36)"); + b.Property("FailureMessage") + .HasMaxLength(1000) + .HasColumnType("varchar(1000)"); - b.Property("CreatedAt") - .HasColumnType("datetime(6)"); + b.Property("HostApiVersion") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("varchar(20)"); - b.Property("IsEnabled") - .HasColumnType("tinyint(1)"); + b.Property("ManifestJson") + .IsRequired() + .HasColumnType("longtext"); - b.Property("Key") - .IsRequired() - .HasMaxLength(100) - .HasColumnType("varchar(100)"); + b.Property("Name") + .IsRequired() + .HasMaxLength(160) + .HasColumnType("varchar(160)"); - b.Property("UpdatedAt") - .HasColumnType("datetime(6)"); + b.Property("PackageContent") + .IsRequired() + .HasColumnType("longblob"); - b.HasKey("Id"); + b.Property("PluginId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.HasIndex("Key") - .IsUnique(); + b.Property("PublisherId") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.ToTable("SystemFeatureSettings"); - }); + b.Property("Sha256") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("varchar(64)"); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); + b.Property("Signature") + .IsRequired() + .HasColumnType("longblob"); - b.Property("ClaimType") - .HasColumnType("longtext"); + b.Property("Status") + .HasColumnType("int"); - b.Property("ClaimValue") - .HasColumnType("longtext"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.Property("RoleId") - .HasColumnType("char(36)"); + b.Property("Version") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("varchar(40)"); - b.HasKey("Id"); + b.HasKey("Id"); - b.HasIndex("RoleId"); + b.HasIndex("PluginId", "Status"); - b.ToTable("AspNetRoleClaims", (string)null); - }); + b.HasIndex("PluginId", "Version") + .IsUnique(); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("int"); + b.ToTable("PluginPackageReleases"); + }); - b.Property("ClaimType") - .HasColumnType("longtext"); + modelBuilder.Entity("Jiaowu.Api.Domain.System.SystemFeatureSetting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("char(36)"); - b.Property("ClaimValue") - .HasColumnType("longtext"); + b.Property("CreatedAt") + .HasColumnType("datetime(6)"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("IsEnabled") + .HasColumnType("tinyint(1)"); - b.HasKey("Id"); + b.Property("Key") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("varchar(100)"); - b.HasIndex("UserId"); + b.Property("UpdatedAt") + .HasColumnType("datetime(6)"); - b.ToTable("AspNetUserClaims", (string)null); - }); + b.HasKey("Id"); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); + b.HasIndex("Key") + .IsUnique(); - b.Property("ProviderKey") - .HasColumnType("varchar(255)"); + b.ToTable("SystemFeatureSettings"); + }); - b.Property("ProviderDisplayName") - .HasColumnType("longtext"); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("ClaimType") + .HasColumnType("longtext"); - b.HasKey("LoginProvider", "ProviderKey"); + b.Property("ClaimValue") + .HasColumnType("longtext"); - b.HasIndex("UserId"); + b.Property("RoleId") + .HasColumnType("char(36)"); - b.ToTable("AspNetUserLogins", (string)null); - }); + b.HasKey("Id"); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); + b.HasIndex("RoleId"); - b.Property("RoleId") - .HasColumnType("char(36)"); + b.ToTable("AspNetRoleClaims"); + }); - b.HasKey("UserId", "RoleId"); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); - b.HasIndex("RoleId"); + b.Property("ClaimType") + .HasColumnType("longtext"); - b.ToTable("AspNetUserRoles", (string)null); - }); + b.Property("ClaimValue") + .HasColumnType("longtext"); - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.Property("UserId") - .HasColumnType("char(36)"); + b.Property("UserId") + .HasColumnType("char(36)"); - b.Property("LoginProvider") - .HasColumnType("varchar(255)"); + b.HasKey("Id"); - b.Property("Name") - .HasColumnType("varchar(255)"); + b.HasIndex("UserId"); - b.Property("Value") - .HasColumnType("longtext"); + b.ToTable("AspNetUserClaims"); + }); - b.HasKey("UserId", "LoginProvider", "Name"); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); - b.ToTable("AspNetUserTokens", (string)null); - }); + b.Property("ProviderKey") + .HasColumnType("varchar(255)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + b.Property("ProviderDisplayName") + .HasColumnType("longtext"); - b.Navigation("AcademicTerm"); - }); + b.Property("UserId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedCounselorUser") - .WithMany() - .HasForeignKey("AssignedCounselorUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + b.HasKey("LoginProvider", "ProviderKey"); - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); + b.HasIndex("UserId"); - b.HasOne("Jiaowu.Api.Domain.Academic.WarningRecord", "WarningRecord") - .WithOne("RiskCase") - .HasForeignKey("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "WarningRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); + b.ToTable("AspNetUserLogins"); + }); - b.Navigation("AssignedCounselorUser"); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); - b.Navigation("Student"); + b.Property("RoleId") + .HasColumnType("char(36)"); - b.Navigation("WarningRecord"); - }); + b.HasKey("UserId", "RoleId"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "AcademicRiskCase") - .WithMany("Entries") - .HasForeignKey("AcademicRiskCaseId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "RecordedByUser") - .WithMany() - .HasForeignKey("RecordedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicRiskCase"); - - b.Navigation("RecordedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CounselorUser") - .WithMany() - .HasForeignKey("CounselorUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") - .WithMany() - .HasForeignKey("MajorId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CounselorUser"); - - b.Navigation("Major"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") - .WithMany("CheckInAttempts") - .HasForeignKey("AttendanceSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AttendanceSheet"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") - .WithMany("Records") - .HasForeignKey("AttendanceSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AttendanceSheet"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("RequestedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") - .WithMany() - .HasForeignKey("SchedulePlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("SchedulePlan"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") - .WithMany() - .HasForeignKey("CampusId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Campus"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", "Application") - .WithOne("PaymentOrder") - .HasForeignKey("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "ApplicationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ConfirmedByUser") - .WithMany() - .HasForeignKey("ConfirmedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Application"); - - b.Navigation("ConfirmedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", "Project") - .WithMany("Applications") - .HasForeignKey("ProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") - .WithMany() - .HasForeignKey("ReviewedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Project"); - - b.Navigation("ReviewedByUser"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("College"); - - b.Navigation("CreatedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "OperatedByUser") - .WithMany() - .HasForeignKey("OperatedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "PaymentOrder") - .WithMany() - .HasForeignKey("PaymentOrderId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.CampusWalletAccount", "WalletAccount") - .WithMany("Transactions") - .HasForeignKey("WalletAccountId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("OperatedByUser"); - - b.Navigation("PaymentOrder"); - - b.Navigation("WalletAccount"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Building", "Building") - .WithMany() - .HasForeignKey("BuildingId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Building"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Classroom"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedByUser") - .WithMany() - .HasForeignKey("AssignedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedToUser") - .WithMany() - .HasForeignKey("AssignedToUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.ClassroomEquipment", "ClassroomEquipment") - .WithMany() - .HasForeignKey("ClassroomEquipmentId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReporterUser") - .WithMany() - .HasForeignKey("ReporterUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("AssignedByUser"); - - b.Navigation("AssignedToUser"); - - b.Navigation("Classroom"); - - b.Navigation("ClassroomEquipment"); - - b.Navigation("ReporterUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.College", "ApplicantCollege") - .WithMany() - .HasForeignKey("ApplicantCollegeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ApplicantUser") - .WithMany() - .HasForeignKey("ApplicantUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") - .WithMany() - .HasForeignKey("ReviewedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("AcademicTerm"); - - b.Navigation("ApplicantCollege"); - - b.Navigation("ApplicantUser"); - - b.Navigation("Classroom"); - - b.Navigation("ReviewedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") - .WithMany() - .HasForeignKey("CampusId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Campus"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", "ResultDetail") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentResultDetailId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Batch"); - - b.Navigation("ResultDetail"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentSchemeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("College"); - - b.Navigation("CreatedByUser"); - - b.Navigation("Scheme"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("Declarations") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentDimensionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", "Rule") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentRuleId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Batch"); - - b.Navigation("Dimension"); - - b.Navigation("Rule"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") - .WithMany("Dimensions") - .HasForeignKey("ComprehensiveAssessmentSchemeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Scheme"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("DimensionLocks") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentDimensionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired() - .HasConstraintName("FK_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); - - b.Navigation("Batch"); - - b.Navigation("Dimension"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", "DimensionLock") - .WithMany("Snapshots") - .HasForeignKey("ComprehensiveAssessmentDimensionLockId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DimensionLock"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("LiveResults") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Batch"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentDimensionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", "Result") - .WithMany("Details") - .HasForeignKey("ComprehensiveAssessmentLiveResultId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("FK_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); - - b.Navigation("Dimension"); - - b.Navigation("Result"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("Publications") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "PublishedByUser") - .WithMany() - .HasForeignKey("PublishedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Batch"); - - b.Navigation("PublishedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("Results") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Batch"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentDimensionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", "Result") - .WithMany("Details") - .HasForeignKey("ComprehensiveAssessmentResultId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired() - .HasConstraintName("FK_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); - - b.Navigation("Dimension"); - - b.Navigation("Result"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") - .WithMany() - .HasForeignKey("ComprehensiveAssessmentDimensionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") - .WithMany("Rules") - .HasForeignKey("ComprehensiveAssessmentSchemeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Dimension"); - - b.Navigation("Scheme"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") - .WithMany("ScheduleNodes") - .HasForeignKey("ComprehensiveAssessmentBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Batch"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("College"); - - b.Navigation("CreatedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.CourseCategory", "CourseCategory") - .WithMany() - .HasForeignKey("CourseCategoryId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("College"); - - b.Navigation("CourseCategory"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "SubstituteTeacher") - .WithMany() - .HasForeignKey("SubstituteTeacherId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("SubstituteTeacher"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", "CourseSelectionOffering") - .WithMany("Enrollments") - .HasForeignKey("CourseSelectionOfferingId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CourseSelectionOffering"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") - .WithMany() - .HasForeignKey("MajorId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") - .WithMany() - .HasForeignKey("OriginalCourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") - .WithMany() - .HasForeignKey("SubstituteCourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Major"); - - b.Navigation("OriginalCourse"); - - b.Navigation("SubstituteCourse"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Student"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) - .WithMany() - .HasForeignKey("GradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CourseGroup", "CourseGroup") - .WithMany("Courses") - .HasForeignKey("CourseGroupId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Course"); - - b.Navigation("CourseGroup"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") - .WithMany("Prerequisites") - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "PrerequisiteCourse") - .WithMany("RequiredByCourses") - .HasForeignKey("PrerequisiteCourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Course"); - - b.Navigation("PrerequisiteCourse"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") - .WithMany("Offerings") - .HasForeignKey("CourseSelectionRoundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CourseSelectionRound"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") - .WithMany("EligibleGrades") - .HasForeignKey("CourseSelectionRoundId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CourseSelectionRound"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", "CourseEquivalencyRule") - .WithMany() - .HasForeignKey("CourseEquivalencyRuleId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") - .WithMany() - .HasForeignKey("OriginalCourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") - .WithMany() - .HasForeignKey("SubstituteCourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CourseEquivalencyRule"); - - b.Navigation("OriginalCourse"); - - b.Navigation("Student"); - - b.Navigation("SubstituteCourse"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumModule", "CurriculumModule") - .WithMany("Courses") - .HasForeignKey("CurriculumModuleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Course"); - - b.Navigation("CurriculumModule"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") - .WithMany("Modules") - .HasForeignKey("CurriculumPlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("CurriculumPlan"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") - .WithMany() - .HasForeignKey("MajorId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Major"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", null) - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Student"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", "DegreeAwardBatch") - .WithMany("Results") - .HasForeignKey("DegreeAwardBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditResult", "GraduationAuditResult") - .WithMany() - .HasForeignKey("GraduationAuditResultId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DegreeAwardBatch"); - - b.Navigation("GraduationAuditResult"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CreatedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "PreferredBuilding") - .WithMany() - .HasForeignKey("PreferredBuildingId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "PreferredRoom") - .WithMany() - .HasForeignKey("PreferredRoomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PreferredBuilding"); - - b.Navigation("PreferredRoom"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") - .WithMany("Beds") - .HasForeignKey("DormitoryRoomId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DormitoryRoom"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") - .WithMany() - .HasForeignKey("CampusId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("Campus"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") - .WithMany() - .HasForeignKey("CreatedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("CreatedByUser"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") - .WithMany() - .HasForeignKey("DormitoryHygieneBatchId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") - .WithMany("SelectedBatches") - .HasForeignKey("DormitoryHygieneCalculationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DormitoryHygieneBatch"); - - b.Navigation("DormitoryHygieneCalculation"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") - .WithMany("Scores") - .HasForeignKey("DormitoryHygieneBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") - .WithMany("HygieneScores") - .HasForeignKey("DormitoryRoomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DormitoryHygieneBatch"); - - b.Navigation("DormitoryRoom"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") - .WithMany("Results") - .HasForeignKey("DormitoryHygieneCalculationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("DormitoryHygieneCalculation"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "DormitoryBed") - .WithOne("Occupancy") - .HasForeignKey("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", "DormitoryBedId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DormitoryBed"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "DormitoryBuilding") - .WithMany("Rooms") - .HasForeignKey("DormitoryBuildingId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("DormitoryBuilding"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", "DormitoryAllocationBatch") - .WithMany() - .HasForeignKey("DormitoryAllocationBatchId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "FromBed") - .WithMany() - .HasForeignKey("FromBedId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "ToBed") - .WithMany() - .HasForeignKey("ToBedId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("DormitoryAllocationBatch"); - - b.Navigation("FromBed"); - - b.Navigation("Student"); - - b.Navigation("ToBed"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") - .WithMany("Dimensions") - .HasForeignKey("EvaluationSetupId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EvaluationSetup"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") - .WithMany("Records") - .HasForeignKey("EvaluationSetupId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("EvaluationSetup"); - - b.Navigation("Student"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationDimension", "EvaluationDimension") - .WithMany("Scores") - .HasForeignKey("EvaluationDimensionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationRecord", "EvaluationRecord") - .WithMany("Scores") - .HasForeignKey("EvaluationRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("EvaluationDimension"); - - b.Navigation("EvaluationRecord"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - 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") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExamPlan", "ExamPlan") - .WithMany("Sessions") - .HasForeignKey("ExamPlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") - .WithMany() - .HasForeignKey("RequiredBuildingId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("ExamPlan"); - - b.Navigation("RequiredBuilding"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExamSession", "ExamSession") - .WithMany("Invigilators") - .HasForeignKey("ExamSessionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ExamSession"); - - b.Navigation("Teacher"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") - .WithMany("Bookings") - .HasForeignKey("ExperimentProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") - .WithMany("Bookings") - .HasForeignKey("ExperimentSessionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ExperimentProject"); - - b.Navigation("ExperimentSession"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Student"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") - .WithMany("Items") - .HasForeignKey("ExperimentGradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ExperimentGradeSheet"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", "ExperimentGradeItem") - .WithMany("Scores") - .HasForeignKey("ExperimentGradeItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", "ExperimentGradeRecord") - .WithMany("ItemScores") - .HasForeignKey("ExperimentGradeRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ExperimentGradeItem"); - - b.Navigation("ExperimentGradeRecord"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") - .WithMany("Records") - .HasForeignKey("ExperimentGradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") - .WithMany() - .HasForeignKey("ExperimentSessionId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ExperimentGradeSheet"); - - b.Navigation("ExperimentSession"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") - .WithOne("GradeSheet") - .HasForeignKey("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ExperimentProject"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") - .WithMany() - .HasForeignKey("ScheduleEntryId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ScheduleEntry"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") - .WithMany("Sessions") - .HasForeignKey("ExperimentProjectId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("ExperimentProject"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") - .WithMany("Instructors") - .HasForeignKey("ExperimentSessionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("ExperimentSession"); - - b.Navigation("Teacher"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("AuthorUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) - .WithMany() - .HasForeignKey("ParentCommentId") - .OnDelete(DeleteBehavior.Cascade); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) - .WithMany() - .HasForeignKey("CommentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeModification", "GradeModification") - .WithOne("GradeAppeal") - .HasForeignKey("Jiaowu.Api.Domain.Academic.GradeAppeal", "GradeModificationId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") - .WithMany() - .HasForeignKey("GradeRecordId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GradeModification"); - - b.Navigation("GradeRecord"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") - .WithMany("Items") - .HasForeignKey("GradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GradeSheet"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeItem", "GradeItem") - .WithMany("Scores") - .HasForeignKey("GradeItemId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") - .WithMany("ItemScores") - .HasForeignKey("GradeRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GradeItem"); - - b.Navigation("GradeRecord"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") - .WithMany() - .HasForeignKey("GradeRecordId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GradeRecord"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") - .WithMany("Records") - .HasForeignKey("GradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GradeSheet"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") - .WithMany("ScoreSubmissions") - .HasForeignKey("GradeRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") - .WithMany("ScoreSubmissions") - .HasForeignKey("GradeSubmissionBatchId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("GradeRecord"); - - b.Navigation("GradeSubmissionBatch"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") - .WithMany("SubmissionBatches") - .HasForeignKey("GradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GradeSheet"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") - .WithMany("SubmissionBatches") - .HasForeignKey("GradeRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") - .WithMany("Records") - .HasForeignKey("GradeSubmissionBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GradeRecord"); - - b.Navigation("GradeSubmissionBatch"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") - .WithMany() - .HasForeignKey("CurriculumPlanId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", "GraduationAuditBatch") - .WithMany("Results") - .HasForeignKey("GraduationAuditBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("CurriculumPlan"); - - b.Navigation("GraduationAuditBatch"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", "GraduationClearanceBatch") - .WithMany("Items") - .HasForeignKey("GraduationClearanceBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GraduationClearanceBatch"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", "GraduationClearanceItem") - .WithMany("Records") - .HasForeignKey("GraduationClearanceItemId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("GraduationClearanceItem"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("College"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") - .WithMany() - .HasForeignKey("MakeupExamPlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("MakeupExamPlan"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") - .WithMany("Enrollments") - .HasForeignKey("MakeupExamSessionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.DeferredExam", "SourceDeferredExam") - .WithMany() - .HasForeignKey("SourceDeferredExamId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "SourceGradeRecord") - .WithMany() - .HasForeignKey("SourceGradeRecordId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MakeupExamSession"); - - b.Navigation("SourceDeferredExam"); - - b.Navigation("SourceGradeRecord"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") - .WithMany("Sessions") - .HasForeignKey("MakeupExamPlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") - .WithMany() - .HasForeignKey("RequiredBuildingId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("MakeupExamPlan"); - - b.Navigation("RequiredBuilding"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") - .WithMany("Invigilators") - .HasForeignKey("MakeupExamSessionId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("MakeupExamSession"); - - b.Navigation("Teacher"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.MessageDispatch", "MessageDispatch") - .WithMany("Notifications") - .HasForeignKey("MessageDispatchId") - .OnDelete(DeleteBehavior.Cascade); - - b.Navigation("MessageDispatch"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Notification", "Notification") - .WithMany("Deliveries") - .HasForeignKey("NotificationId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.WebPushSubscription", "WebPushSubscription") - .WithMany("Deliveries") - .HasForeignKey("WebPushSubscriptionId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("Notification"); - - b.Navigation("WebPushSubscription"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "InvalidatedByUser") - .WithMany() - .HasForeignKey("InvalidatedByUserId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "IssuedByUser") - .WithMany() - .HasForeignKey("IssuedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "ReissuedFromDocument") - .WithMany() - .HasForeignKey("ReissuedFromDocumentId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("InvalidatedByUser"); - - b.Navigation("IssuedByUser"); - - b.Navigation("ReissuedFromDocument"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "DownloadedByUser") - .WithMany() - .HasForeignKey("DownloadedByUserId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "OfficialDocument") - .WithMany("Downloads") - .HasForeignKey("OfficialDocumentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("DownloadedByUser"); - - b.Navigation("OfficialDocument"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.OtherExamBatch", "OtherExamBatch") - .WithMany("Results") - .HasForeignKey("OtherExamBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("OtherExamBatch"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", "PhysicalTestRecord") - .WithMany("Items") - .HasForeignKey("PhysicalTestRecordId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("PhysicalTestRecord"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", "PhysicalTestBatch") - .WithMany("Records") - .HasForeignKey("PhysicalTestBatchId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("PhysicalTestBatch"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") - .WithMany() - .HasForeignKey("ScheduleEntryId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("ScheduleEntry"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") - .WithMany("Entries") - .HasForeignKey("SchedulePlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("SchedulePlan"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("RequestedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") - .WithMany() - .HasForeignKey("SchedulePlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("SchedulePlan"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") - .WithMany("Students") - .HasForeignKey("AdministrativeClassId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("AdministrativeClass"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "EnlistmentChange") - .WithMany() - .HasForeignKey("EnlistmentChangeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("EnlistmentChange"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AffectedTerm") - .WithMany() - .HasForeignKey("AffectedTermId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "OriginalClass") - .WithMany() - .HasForeignKey("OriginalClassId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "TargetClass") - .WithMany() - .HasForeignKey("TargetClassId") - .OnDelete(DeleteBehavior.Restrict); - - b.Navigation("AffectedTerm"); - - b.Navigation("OriginalClass"); - - b.Navigation("Student"); - - b.Navigation("TargetClass"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") - .WithMany() - .HasForeignKey("StudentStatusChangeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("StudentStatusChange"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") - .WithMany() - .HasForeignKey("StudentStatusChangeId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("StudentStatusChange"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentBooking", null) - .WithMany() - .HasForeignKey("ExperimentBookingId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", null) - .WithMany() - .HasForeignKey("ExperimentSessionId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") - .WithMany() - .HasForeignKey("StudentStatusChangeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("StudentStatusChange"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) - .WithMany() - .HasForeignKey("GradeSheetId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") - .WithMany() - .HasForeignKey("StudentStatusChangeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("StudentStatusChange"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") - .WithMany() - .HasForeignKey("CollegeId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.SetNull); - - b.Navigation("College"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("ReviewedByUserId") - .OnDelete(DeleteBehavior.SetNull); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("Course"); - - b.Navigation("Teacher"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("Teacher"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", "TeachingImprovementPlan") - .WithMany("Reviews") - .HasForeignKey("TeachingImprovementPlanId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TeachingImprovementPlan"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("Course"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") - .WithMany("AllowedClassrooms") - .HasForeignKey("TeachingTaskScheduleConstraintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("TeachingTaskScheduleConstraint"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") - .WithMany() - .HasForeignKey("ClassroomId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") - .WithMany("AllowedExperimentClassrooms") - .HasForeignKey("TeachingTaskScheduleConstraintId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Classroom"); - - b.Navigation("TeachingTaskScheduleConstraint"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") - .WithMany() - .HasForeignKey("AdministrativeClassId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany("Classes") - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AdministrativeClass"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskGradeStatistic") - .WithMany("ScoreBands") - .HasForeignKey("TeachingTaskGradeStatisticId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TeachingTaskGradeStatistic"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) - .WithMany() - .HasForeignKey("CourseId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") - .WithOne() - .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "GradeSheetId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithOne() - .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("GradeSheet"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Building", "ExperimentRequiredBuilding") - .WithMany() - .HasForeignKey("ExperimentRequiredBuildingId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "ExperimentRequiredCampus") - .WithMany() - .HasForeignKey("ExperimentRequiredCampusId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") - .WithMany() - .HasForeignKey("RequiredBuildingId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "RequiredCampus") - .WithMany() - .HasForeignKey("RequiredCampusId") - .OnDelete(DeleteBehavior.Restrict); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany() - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("ExperimentRequiredBuilding"); - - b.Navigation("ExperimentRequiredCampus"); - - b.Navigation("RequiredBuilding"); - - b.Navigation("RequiredCampus"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") - .WithMany() - .HasForeignKey("TeacherId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") - .WithMany("Teachers") - .HasForeignKey("TeachingTaskId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Teacher"); - - b.Navigation("TeachingTask"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.TuitionBill", "TuitionBill") - .WithMany("Payments") - .HasForeignKey("TuitionBillId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("TuitionBill"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") - .WithMany() - .HasForeignKey("StudentId") - .OnDelete(DeleteBehavior.Restrict) - .IsRequired(); - - b.Navigation("Student"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => - { - b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") - .WithMany() - .HasForeignKey("AcademicTermId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("AcademicTerm"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") - .WithOne() - .HasForeignKey("Jiaowu.Api.Domain.Identity.UserNavigationPreference", "UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("User"); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) - .WithMany() - .HasForeignKey("RoleId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => - { - b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) - .WithMany() - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => - { - b.Navigation("Entries"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => - { - b.Navigation("Students"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => - { - b.Navigation("CheckInAttempts"); - - b.Navigation("Records"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => - { - b.Navigation("PaymentOrder"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => - { - b.Navigation("Applications"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => - { - b.Navigation("Transactions"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => - { - b.Navigation("Declarations"); - - b.Navigation("DimensionLocks"); - - b.Navigation("LiveResults"); - - b.Navigation("Publications"); - - b.Navigation("Results"); - - b.Navigation("ScheduleNodes"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => - { - b.Navigation("Snapshots"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => - { - b.Navigation("Details"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => - { - b.Navigation("Dimensions"); - - b.Navigation("Rules"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => - { - b.Navigation("Prerequisites"); - - b.Navigation("RequiredByCourses"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => - { - b.Navigation("Courses"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => - { - b.Navigation("Enrollments"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => - { - b.Navigation("EligibleGrades"); + b.HasIndex("RoleId"); - b.Navigation("Offerings"); - }); + b.ToTable("AspNetUserRoles"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => - { - b.Navigation("Courses"); - }); + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.Property("UserId") + .HasColumnType("char(36)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => - { - b.Navigation("Modules"); - }); + b.Property("LoginProvider") + .HasColumnType("varchar(255)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => - { - b.Navigation("Results"); - }); + b.Property("Name") + .HasColumnType("varchar(255)"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => - { - b.Navigation("Occupancy"); - }); + b.Property("Value") + .HasColumnType("longtext"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => - { - b.Navigation("Rooms"); - }); + b.HasKey("UserId", "LoginProvider", "Name"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => - { - b.Navigation("Scores"); - }); + b.ToTable("AspNetUserTokens"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => - { - b.Navigation("Results"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicCalendarEvent", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); - b.Navigation("SelectedBatches"); - }); + b.Navigation("AcademicTerm"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => - { - b.Navigation("Beds"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedCounselorUser") + .WithMany() + .HasForeignKey("AssignedCounselorUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); - b.Navigation("HygieneScores"); - }); + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => - { - b.Navigation("Scores"); - }); + b.HasOne("Jiaowu.Api.Domain.Academic.WarningRecord", "WarningRecord") + .WithOne("RiskCase") + .HasForeignKey("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "WarningRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => - { - b.Navigation("Scores"); - }); + b.Navigation("AssignedCounselorUser"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => - { - b.Navigation("Dimensions"); + b.Navigation("Student"); - b.Navigation("Records"); - }); + b.Navigation("WarningRecord"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => - { - b.Navigation("Rooms"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCaseEntry", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicRiskCase", "AcademicRiskCase") + .WithMany("Entries") + .HasForeignKey("AcademicRiskCaseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "RecordedByUser") + .WithMany() + .HasForeignKey("RecordedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicRiskCase"); + + b.Navigation("RecordedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CounselorUser") + .WithMany() + .HasForeignKey("CounselorUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CounselorUser"); + + b.Navigation("Major"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceCheckInAttempt", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") + .WithMany("CheckInAttempts") + .HasForeignKey("AttendanceSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AttendanceSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AttendanceSheet", "AttendanceSheet") + .WithMany("Records") + .HasForeignKey("AttendanceSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AttendanceSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AutomaticScheduleJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("RequestedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany() + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SchedulePlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Building", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", "Application") + .WithOne("PaymentOrder") + .HasForeignKey("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "ApplicationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ConfirmedByUser") + .WithMany() + .HasForeignKey("ConfirmedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Application"); + + b.Navigation("ConfirmedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", "Project") + .WithMany("Applications") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Project"); + + b.Navigation("ReviewedByUser"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletTransaction", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "OperatedByUser") + .WithMany() + .HasForeignKey("OperatedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.CampusPaymentOrder", "PaymentOrder") + .WithMany() + .HasForeignKey("PaymentOrderId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.CampusWalletAccount", "WalletAccount") + .WithMany("Transactions") + .HasForeignKey("WalletAccountId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("OperatedByUser"); + + b.Navigation("PaymentOrder"); + + b.Navigation("WalletAccount"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Classroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "Building") + .WithMany() + .HasForeignKey("BuildingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Building"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomEquipment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomRepairTicket", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedByUser") + .WithMany() + .HasForeignKey("AssignedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "AssignedToUser") + .WithMany() + .HasForeignKey("AssignedToUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ClassroomEquipment", "ClassroomEquipment") + .WithMany() + .HasForeignKey("ClassroomEquipmentId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReporterUser") + .WithMany() + .HasForeignKey("ReporterUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AssignedByUser"); + + b.Navigation("AssignedToUser"); + + b.Navigation("Classroom"); + + b.Navigation("ClassroomEquipment"); + + b.Navigation("ReporterUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ClassroomReservation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.College", "ApplicantCollege") + .WithMany() + .HasForeignKey("ApplicantCollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ApplicantUser") + .WithMany() + .HasForeignKey("ApplicantUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "ReviewedByUser") + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AcademicTerm"); + + b.Navigation("ApplicantCollege"); + + b.Navigation("ApplicantUser"); + + b.Navigation("Classroom"); + + b.Navigation("ReviewedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.College", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentAppeal", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", "ResultDetail") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentResultDetailId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("ResultDetail"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDeclaration", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Declarations") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", "Rule") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentRuleId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Dimension"); + + b.Navigation("Rule"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany("Dimensions") + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("DimensionLocks") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentDimensionLocks_ComprehensiveAssessme~1"); + + b.Navigation("Batch"); + + b.Navigation("Dimension"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionSnapshot", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", "DimensionLock") + .WithMany("Snapshots") + .HasForeignKey("ComprehensiveAssessmentDimensionLockId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DimensionLock"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("LiveResults") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResultDetail", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", "Result") + .WithMany("Details") + .HasForeignKey("ComprehensiveAssessmentLiveResultId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentLiveResultDetails_ComprehensiveAsses~1"); + + b.Navigation("Dimension"); + + b.Navigation("Result"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentPublication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Publications") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "PublishedByUser") + .WithMany() + .HasForeignKey("PublishedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("PublishedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("Results") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Batch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResultDetail", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", "Result") + .WithMany("Details") + .HasForeignKey("ComprehensiveAssessmentResultId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired() + .HasConstraintName("FK_ComprehensiveAssessmentResultDetails_ComprehensiveAssessmen~1"); + + b.Navigation("Dimension"); + + b.Navigation("Result"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimension", "Dimension") + .WithMany() + .HasForeignKey("ComprehensiveAssessmentDimensionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", "Scheme") + .WithMany("Rules") + .HasForeignKey("ComprehensiveAssessmentSchemeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Dimension"); + + b.Navigation("Scheme"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheduleNode", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", "Batch") + .WithMany("ScheduleNodes") + .HasForeignKey("ComprehensiveAssessmentBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Batch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.CourseCategory", "CourseCategory") + .WithMany() + .HasForeignKey("CourseCategoryId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("College"); + + b.Navigation("CourseCategory"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseAdjustment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "SubstituteTeacher") + .WithMany() + .HasForeignKey("SubstituteTeacherId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("SubstituteTeacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEnrollment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", "CourseSelectionOffering") + .WithMany("Enrollments") + .HasForeignKey("CourseSelectionOfferingId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseSelectionOffering"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") + .WithMany() + .HasForeignKey("OriginalCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") + .WithMany() + .HasForeignKey("SubstituteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Major"); + + b.Navigation("OriginalCourse"); + + b.Navigation("SubstituteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseExemption", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGradeStatisticsRefreshJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) + .WithMany() + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroupCourse", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseGroup", "CourseGroup") + .WithMany("Courses") + .HasForeignKey("CourseGroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("CourseGroup"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CoursePrerequisite", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany("Prerequisites") + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "PrerequisiteCourse") + .WithMany("RequiredByCourses") + .HasForeignKey("PrerequisiteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("PrerequisiteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") + .WithMany("Offerings") + .HasForeignKey("CourseSelectionRoundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseSelectionRound"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRoundGrade", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseSelectionRound", "CourseSelectionRound") + .WithMany("EligibleGrades") + .HasForeignKey("CourseSelectionRoundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CourseSelectionRound"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSubstitution", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CourseEquivalencyRule", "CourseEquivalencyRule") + .WithMany() + .HasForeignKey("CourseEquivalencyRuleId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "OriginalCourse") + .WithMany() + .HasForeignKey("OriginalCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "SubstituteCourse") + .WithMany() + .HasForeignKey("SubstituteCourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CourseEquivalencyRule"); + + b.Navigation("OriginalCourse"); + + b.Navigation("Student"); + + b.Navigation("SubstituteCourse"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumCourse", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumModule", "CurriculumModule") + .WithMany("Courses") + .HasForeignKey("CurriculumModuleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Course"); + + b.Navigation("CurriculumModule"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") + .WithMany("Modules") + .HasForeignKey("CurriculumPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CurriculumPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Major", "Major") + .WithMany() + .HasForeignKey("MajorId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Major"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DataImportBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", null) + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DeferredExam", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", "DegreeAwardBatch") + .WithMany("Results") + .HasForeignKey("DegreeAwardBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditResult", "GraduationAuditResult") + .WithMany() + .HasForeignKey("GraduationAuditResultId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DegreeAwardBatch"); + + b.Navigation("GraduationAuditResult"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "PreferredBuilding") + .WithMany() + .HasForeignKey("PreferredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "PreferredRoom") + .WithMany() + .HasForeignKey("PreferredRoomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PreferredBuilding"); + + b.Navigation("PreferredRoom"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") + .WithMany("Beds") + .HasForeignKey("DormitoryRoomId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DormitoryRoom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "Campus") + .WithMany() + .HasForeignKey("CampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("Campus"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "CreatedByUser") + .WithMany() + .HasForeignKey("CreatedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("CreatedByUser"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculationBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") + .WithMany() + .HasForeignKey("DormitoryHygieneBatchId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") + .WithMany("SelectedBatches") + .HasForeignKey("DormitoryHygieneCalculationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DormitoryHygieneBatch"); + + b.Navigation("DormitoryHygieneCalculation"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", "DormitoryHygieneBatch") + .WithMany("Scores") + .HasForeignKey("DormitoryHygieneBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryRoom", "DormitoryRoom") + .WithMany("HygieneScores") + .HasForeignKey("DormitoryRoomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryHygieneBatch"); + + b.Navigation("DormitoryRoom"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneStudentSummary", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", "DormitoryHygieneCalculation") + .WithMany("Results") + .HasForeignKey("DormitoryHygieneCalculationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("DormitoryHygieneCalculation"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "DormitoryBed") + .WithOne("Occupancy") + .HasForeignKey("Jiaowu.Api.Domain.Academic.DormitoryOccupancy", "DormitoryBedId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryBed"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBuilding", "DormitoryBuilding") + .WithMany("Rooms") + .HasForeignKey("DormitoryBuildingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("DormitoryBuilding"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryStayHistory", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryAllocationBatch", "DormitoryAllocationBatch") + .WithMany() + .HasForeignKey("DormitoryAllocationBatchId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "FromBed") + .WithMany() + .HasForeignKey("FromBedId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DormitoryBed", "ToBed") + .WithMany() + .HasForeignKey("ToBedId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("DormitoryAllocationBatch"); + + b.Navigation("FromBed"); + + b.Navigation("Student"); + + b.Navigation("ToBed"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") + .WithMany("Dimensions") + .HasForeignKey("EvaluationSetupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationSetup"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationSetup", "EvaluationSetup") + .WithMany("Records") + .HasForeignKey("EvaluationSetupId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("EvaluationSetup"); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationDimension", "EvaluationDimension") + .WithMany("Scores") + .HasForeignKey("EvaluationDimensionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.EvaluationRecord", "EvaluationRecord") + .WithMany("Scores") + .HasForeignKey("EvaluationRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("EvaluationDimension"); + + b.Navigation("EvaluationRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + 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") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExamPlan", "ExamPlan") + .WithMany("Sessions") + .HasForeignKey("ExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ExamPlan"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSessionInvigilator", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExamSession", "ExamSession") + .WithMany("Invigilators") + .HasForeignKey("ExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExamSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentBooking", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithMany("Bookings") + .HasForeignKey("ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany("Bookings") + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentProject"); + + b.Navigation("ExperimentSession"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentCourseGrade", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Student"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") + .WithMany("Items") + .HasForeignKey("ExperimentGradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentGradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItemScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", "ExperimentGradeItem") + .WithMany("Scores") + .HasForeignKey("ExperimentGradeItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", "ExperimentGradeRecord") + .WithMany("ItemScores") + .HasForeignKey("ExperimentGradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentGradeItem"); + + b.Navigation("ExperimentGradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentGradeSheet") + .WithMany("Records") + .HasForeignKey("ExperimentGradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany() + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentGradeSheet"); + + b.Navigation("ExperimentSession"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithOne("GradeSheet") + .HasForeignKey("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", "ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentProject"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") + .WithMany() + .HasForeignKey("ScheduleEntryId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ScheduleEntry"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentProject", "ExperimentProject") + .WithMany("Sessions") + .HasForeignKey("ExperimentProjectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ExperimentProject"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSessionInstructor", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", "ExperimentSession") + .WithMany("Instructors") + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("ExperimentSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("AuthorUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) + .WithMany() + .HasForeignKey("ParentCommentId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAnalyticsCommentReaction", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeAnalyticsComment", null) + .WithMany() + .HasForeignKey("CommentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeAppeal", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeModification", "GradeModification") + .WithOne("GradeAppeal") + .HasForeignKey("Jiaowu.Api.Domain.Academic.GradeAppeal", "GradeModificationId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany() + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeModification"); + + b.Navigation("GradeRecord"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("Items") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItemScore", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeItem", "GradeItem") + .WithMany("Scores") + .HasForeignKey("GradeItemId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("ItemScores") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeItem"); + + b.Navigation("GradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany() + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("Records") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GradeSheet"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeScoreSubmission", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("ScoreSubmissions") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") + .WithMany("ScoreSubmissions") + .HasForeignKey("GradeSubmissionBatchId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("GradeRecord"); + + b.Navigation("GradeSubmissionBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithMany("SubmissionBatches") + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatchRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "GradeRecord") + .WithMany("SubmissionBatches") + .HasForeignKey("GradeRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", "GradeSubmissionBatch") + .WithMany("Records") + .HasForeignKey("GradeSubmissionBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeRecord"); + + b.Navigation("GradeSubmissionBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.CurriculumPlan", "CurriculumPlan") + .WithMany() + .HasForeignKey("CurriculumPlanId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", "GraduationAuditBatch") + .WithMany("Results") + .HasForeignKey("GraduationAuditBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("CurriculumPlan"); + + b.Navigation("GraduationAuditBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", "GraduationClearanceBatch") + .WithMany("Items") + .HasForeignKey("GraduationClearanceBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GraduationClearanceBatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", "GraduationClearanceItem") + .WithMany("Records") + .HasForeignKey("GraduationClearanceItemId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("GraduationClearanceItem"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Major", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("College"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamAutoJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") + .WithMany() + .HasForeignKey("MakeupExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("MakeupExamPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamEnrollment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") + .WithMany("Enrollments") + .HasForeignKey("MakeupExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.DeferredExam", "SourceDeferredExam") + .WithMany() + .HasForeignKey("SourceDeferredExamId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeRecord", "SourceGradeRecord") + .WithMany() + .HasForeignKey("SourceGradeRecordId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MakeupExamSession"); + + b.Navigation("SourceDeferredExam"); + + b.Navigation("SourceGradeRecord"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamPlan", "MakeupExamPlan") + .WithMany("Sessions") + .HasForeignKey("MakeupExamPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("MakeupExamPlan"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSessionInvigilator", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MakeupExamSession", "MakeupExamSession") + .WithMany("Invigilators") + .HasForeignKey("MakeupExamSessionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("MakeupExamSession"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.MessageDispatch", "MessageDispatch") + .WithMany("Notifications") + .HasForeignKey("MessageDispatchId") + .OnDelete(DeleteBehavior.Cascade); + + b.Navigation("MessageDispatch"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationDelivery", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Notification", "Notification") + .WithMany("Deliveries") + .HasForeignKey("NotificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.WebPushSubscription", "WebPushSubscription") + .WithMany("Deliveries") + .HasForeignKey("WebPushSubscriptionId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Notification"); + + b.Navigation("WebPushSubscription"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.NotificationPreference", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "InvalidatedByUser") + .WithMany() + .HasForeignKey("InvalidatedByUserId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "IssuedByUser") + .WithMany() + .HasForeignKey("IssuedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "ReissuedFromDocument") + .WithMany() + .HasForeignKey("ReissuedFromDocumentId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("InvalidatedByUser"); + + b.Navigation("IssuedByUser"); + + b.Navigation("ReissuedFromDocument"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocumentDownload", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "DownloadedByUser") + .WithMany() + .HasForeignKey("DownloadedByUserId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.OfficialDocument", "OfficialDocument") + .WithMany("Downloads") + .HasForeignKey("OfficialDocumentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DownloadedByUser"); + + b.Navigation("OfficialDocument"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.OtherExamBatch", "OtherExamBatch") + .WithMany("Results") + .HasForeignKey("OtherExamBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("OtherExamBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestItemResult", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", "PhysicalTestRecord") + .WithMany("Items") + .HasForeignKey("PhysicalTestRecordId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("PhysicalTestRecord"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", "PhysicalTestBatch") + .WithMany("Records") + .HasForeignKey("PhysicalTestBatchId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("PhysicalTestBatch"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PublishedScheduleOccurrence", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.ScheduleEntry", "ScheduleEntry") + .WithMany() + .HasForeignKey("ScheduleEntryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("ScheduleEntry"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleEntry", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany("Entries") + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("SchedulePlan"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleOptimizationSettings", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePublishJob", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("RequestedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.SchedulePlan", "SchedulePlan") + .WithMany() + .HasForeignKey("SchedulePlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SchedulePlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ScheduleTimeSlot", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Student", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") + .WithMany("Students") + .HasForeignKey("AdministrativeClassId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("AdministrativeClass"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentAcademicTermStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentLeave", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentMilitaryDischargeReport", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "EnlistmentChange") + .WithMany() + .HasForeignKey("EnlistmentChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("EnlistmentChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChange", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AffectedTerm") + .WithMany() + .HasForeignKey("AffectedTermId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "OriginalClass") + .WithMany() + .HasForeignKey("OriginalClassId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "TargetClass") + .WithMany() + .HasForeignKey("TargetClassId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("AffectedTerm"); + + b.Navigation("OriginalClass"); + + b.Navigation("Student"); + + b.Navigation("TargetClass"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeCourseEffect", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeEvent", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeExperimentEffect", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentBooking", null) + .WithMany() + .HasForeignKey("ExperimentBookingId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.ExperimentSession", null) + .WithMany() + .HasForeignKey("ExperimentSessionId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.StudentStatusChangeGradeArchive", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", null) + .WithMany() + .HasForeignKey("GradeSheetId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", null) + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.StudentStatusChange", "StudentStatusChange") + .WithMany() + .HasForeignKey("StudentStatusChangeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", null) + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("StudentStatusChange"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Teacher", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.College", "College") + .WithMany() + .HasForeignKey("CollegeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("College"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeacherCourseApplication", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("ReviewedByUserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Course"); + + b.Navigation("Teacher"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Teacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementReview", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", "TeachingImprovementPlan") + .WithMany("Reviews") + .HasForeignKey("TeachingImprovementPlanId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingImprovementPlan"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringReminder", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingMonitoringSetting", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingObservationEvaluation", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", "Course") + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Course"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedClassroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") + .WithMany("AllowedClassrooms") + .HasForeignKey("TeachingTaskScheduleConstraintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("TeachingTaskScheduleConstraint"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskAllowedExperimentClassroom", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Classroom", "Classroom") + .WithMany() + .HasForeignKey("ClassroomId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", "TeachingTaskScheduleConstraint") + .WithMany("AllowedExperimentClassrooms") + .HasForeignKey("TeachingTaskScheduleConstraintId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classroom"); + + b.Navigation("TeachingTaskScheduleConstraint"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskClass", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AdministrativeClass", "AdministrativeClass") + .WithMany() + .HasForeignKey("AdministrativeClassId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany("Classes") + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AdministrativeClass"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeScoreBand", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskGradeStatistic") + .WithMany("ScoreBands") + .HasForeignKey("TeachingTaskGradeStatisticId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TeachingTaskGradeStatistic"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", null) + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Course", null) + .WithMany() + .HasForeignKey("CourseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.GradeSheet", "GradeSheet") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "GradeSheetId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", "TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("GradeSheet"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "ExperimentRequiredBuilding") + .WithMany() + .HasForeignKey("ExperimentRequiredBuildingId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "ExperimentRequiredCampus") + .WithMany() + .HasForeignKey("ExperimentRequiredCampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Building", "RequiredBuilding") + .WithMany() + .HasForeignKey("RequiredBuildingId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.Campus", "RequiredCampus") + .WithMany() + .HasForeignKey("RequiredCampusId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany() + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ExperimentRequiredBuilding"); + + b.Navigation("ExperimentRequiredCampus"); + + b.Navigation("RequiredBuilding"); + + b.Navigation("RequiredCampus"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskTeacher", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Teacher", "Teacher") + .WithMany() + .HasForeignKey("TeacherId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.TeachingTask", "TeachingTask") + .WithMany("Teachers") + .HasForeignKey("TeachingTaskId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Teacher"); + + b.Navigation("TeachingTask"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionPayment", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.TuitionBill", "TuitionBill") + .WithMany("Payments") + .HasForeignKey("TuitionBillId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("TuitionBill"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionTermSetting", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.Student", "Student") + .WithMany() + .HasForeignKey("StudentId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Student"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRule", b => + { + b.HasOne("Jiaowu.Api.Domain.Academic.AcademicTerm", "AcademicTerm") + .WithMany() + .HasForeignKey("AcademicTermId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("AcademicTerm"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.PasskeyCredential", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.RefreshSession", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Identity.UserNavigationPreference", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", "User") + .WithOne() + .HasForeignKey("Jiaowu.Api.Domain.Identity.UserNavigationPreference", "UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationRole", null) + .WithMany() + .HasForeignKey("RoleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b => + { + b.HasOne("Jiaowu.Api.Domain.Identity.ApplicationUser", null) + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AcademicRiskCase", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AdministrativeClass", b => + { + b.Navigation("Students"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.AttendanceSheet", b => + { + b.Navigation("CheckInAttempts"); + + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationApplication", b => + { + b.Navigation("PaymentOrder"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusRegistrationProject", b => + { + b.Navigation("Applications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CampusWalletAccount", b => + { + b.Navigation("Transactions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentBatch", b => + { + b.Navigation("Declarations"); + + b.Navigation("DimensionLocks"); + + b.Navigation("LiveResults"); + + b.Navigation("Publications"); + + b.Navigation("Results"); + + b.Navigation("ScheduleNodes"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentDimensionLock", b => + { + b.Navigation("Snapshots"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentLiveResult", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentResult", b => + { + b.Navigation("Details"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ComprehensiveAssessmentScheme", b => + { + b.Navigation("Dimensions"); + + b.Navigation("Rules"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Course", b => + { + b.Navigation("Prerequisites"); + + b.Navigation("RequiredByCourses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseGroup", b => + { + b.Navigation("Courses"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionOffering", b => + { + b.Navigation("Enrollments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CourseSelectionRound", b => + { + b.Navigation("EligibleGrades"); - b.Navigation("Sessions"); - }); + b.Navigation("Offerings"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b => - { - b.Navigation("Invigilators"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumModule", b => + { + b.Navigation("Courses"); + }); - b.Navigation("Seats"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.CurriculumPlan", b => + { + b.Navigation("Modules"); + }); - b.Navigation("SessionLinks"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DegreeAwardBatch", b => + { + b.Navigation("Results"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b => - { - b.Navigation("Invigilators"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBed", b => + { + b.Navigation("Occupancy"); + }); - b.Navigation("RoomLinks"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryBuilding", b => + { + b.Navigation("Rooms"); + }); - b.Navigation("SeatAssignments"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneBatch", b => + { + b.Navigation("Scores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => - { - b.Navigation("Scores"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryHygieneCalculation", b => + { + b.Navigation("Results"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => - { - b.Navigation("ItemScores"); - }); + b.Navigation("SelectedBatches"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => - { - b.Navigation("Items"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.DormitoryRoom", b => + { + b.Navigation("Beds"); - b.Navigation("Records"); - }); + b.Navigation("HygieneScores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => - { - b.Navigation("Bookings"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationDimension", b => + { + b.Navigation("Scores"); + }); - b.Navigation("GradeSheet"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationRecord", b => + { + b.Navigation("Scores"); + }); - b.Navigation("Sessions"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.EvaluationSetup", b => + { + b.Navigation("Dimensions"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => - { - b.Navigation("Bookings"); + b.Navigation("Records"); + }); - b.Navigation("Instructors"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamPlan", b => + { + b.Navigation("Rooms"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => - { - b.Navigation("Scores"); - }); + b.Navigation("Sessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => - { - b.Navigation("GradeAppeal"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamRoomAssignment", b => + { + b.Navigation("Invigilators"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => - { - b.Navigation("ItemScores"); + b.Navigation("Seats"); - b.Navigation("ScoreSubmissions"); + b.Navigation("SessionLinks"); + }); - b.Navigation("SubmissionBatches"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExamSession", b => + { + b.Navigation("Invigilators"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => - { - b.Navigation("Items"); + b.Navigation("RoomLinks"); - b.Navigation("Records"); + b.Navigation("SeatAssignments"); + }); - b.Navigation("SubmissionBatches"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeItem", b => + { + b.Navigation("Scores"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => - { - b.Navigation("Records"); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeRecord", b => + { + b.Navigation("ItemScores"); + }); - b.Navigation("ScoreSubmissions"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentGradeSheet", b => + { + b.Navigation("Items"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => - { - b.Navigation("Results"); - }); + b.Navigation("Records"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => - { - b.Navigation("Items"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentProject", b => + { + b.Navigation("Bookings"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => - { - b.Navigation("Records"); - }); + b.Navigation("GradeSheet"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => - { - b.Navigation("Sessions"); - }); + b.Navigation("Sessions"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => - { - b.Navigation("Enrollments"); - - b.Navigation("Invigilators"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.ExperimentSession", b => + { + b.Navigation("Bookings"); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => - { - b.Navigation("Notifications"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => - { - b.Navigation("Deliveries"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => - { - b.Navigation("Downloads"); - }); + b.Navigation("Instructors"); + }); - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => - { - b.Navigation("Results"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => - { - b.Navigation("Records"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => - { - b.Navigation("Items"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => - { - b.Navigation("Entries"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => - { - b.Navigation("Reviews"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => - { - b.Navigation("Classes"); - - b.Navigation("Teachers"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => - { - b.Navigation("ScoreBands"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => - { - b.Navigation("AllowedClassrooms"); - - b.Navigation("AllowedExperimentClassrooms"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => - { - b.Navigation("Payments"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => - { - b.Navigation("RiskCase"); - }); - - modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => - { - b.Navigation("Deliveries"); - }); + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeItem", b => + { + b.Navigation("Scores"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeModification", b => + { + b.Navigation("GradeAppeal"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeRecord", b => + { + b.Navigation("ItemScores"); + + b.Navigation("ScoreSubmissions"); + + b.Navigation("SubmissionBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSheet", b => + { + b.Navigation("Items"); + + b.Navigation("Records"); + + b.Navigation("SubmissionBatches"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GradeSubmissionBatch", b => + { + b.Navigation("Records"); + + b.Navigation("ScoreSubmissions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationAuditBatch", b => + { + b.Navigation("Results"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceBatch", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.GraduationClearanceItem", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamPlan", b => + { + b.Navigation("Sessions"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MakeupExamSession", b => + { + b.Navigation("Enrollments"); + + b.Navigation("Invigilators"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.MessageDispatch", b => + { + b.Navigation("Notifications"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.Notification", b => + { + b.Navigation("Deliveries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OfficialDocument", b => + { + b.Navigation("Downloads"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.OtherExamBatch", b => + { + b.Navigation("Results"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestBatch", b => + { + b.Navigation("Records"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.PhysicalTestRecord", b => + { + b.Navigation("Items"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.SchedulePlan", b => + { + b.Navigation("Entries"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingImprovementPlan", b => + { + b.Navigation("Reviews"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTask", b => + { + b.Navigation("Classes"); + + b.Navigation("Teachers"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskGradeStatistic", b => + { + b.Navigation("ScoreBands"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TeachingTaskScheduleConstraint", b => + { + b.Navigation("AllowedClassrooms"); + + b.Navigation("AllowedExperimentClassrooms"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.TuitionBill", b => + { + b.Navigation("Payments"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WarningRecord", b => + { + b.Navigation("RiskCase"); + }); + + modelBuilder.Entity("Jiaowu.Api.Domain.Academic.WebPushSubscription", b => + { + b.Navigation("Deliveries"); + }); #pragma warning restore 612, 618 - } } } diff --git a/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs b/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs index 074930d..71e3526 100644 --- a/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs +++ b/tests/Jiaowu.Api.Tests/ApprovalsControllerTests.cs @@ -13,6 +13,25 @@ namespace Jiaowu.Api.Tests; public sealed class ApprovalsControllerTests { + [Fact] + public async Task Student_leave_is_scoped_and_only_pending_requests_can_be_reviewed_or_withdrawn() + { + await using var fixture = await ApprovalFixture.CreateAsync(); + var student = new StudentLeavesController(fixture.Db, new StudentDataScope(fixture.Student.UserId!.Value)); + var start = DateTimeOffset.UtcNow; + Assert.IsType(await student.Create(new(StudentLeaveType.Sick, start, start, "病假"), CancellationToken.None)); + Assert.IsType(await student.Create(new(StudentLeaveType.Sick, start, start.AddDays(1), "病假"), CancellationToken.None)); + var leave = await fixture.Db.StudentLeaves.SingleAsync(); + var outsider = new StudentLeavesController(fixture.Db, new CollegeDataScope(Guid.NewGuid())); + Assert.IsType(await outsider.Review(leave.Id, new(true, null), CancellationToken.None)); + var manager = new StudentLeavesController(fixture.Db, new ManagerDataScope()); + Assert.IsType(await manager.Review(leave.Id, new(false, " "), CancellationToken.None)); + Assert.IsType(await manager.Review(leave.Id, new(true, "同意"), CancellationToken.None)); + Assert.IsType(await student.Withdraw(leave.Id, CancellationToken.None)); + Assert.IsType(await manager.Review(leave.Id, new(false, "重复审核"), CancellationToken.None)); + fixture.Db.ChangeTracker.Clear(); + Assert.Equal(StudentLeaveStatus.Approved, (await fixture.Db.StudentLeaves.SingleAsync()).Status); + } [Fact] public async Task Staff_can_apply_for_student_within_scope_and_actor_is_recorded() { diff --git a/web/src/components.d.ts b/web/src/components.d.ts index 4c212d2..4a047d0 100644 --- a/web/src/components.d.ts +++ b/web/src/components.d.ts @@ -77,6 +77,7 @@ declare module 'vue' { RouterView: typeof import('vue-router')['RouterView'] SiteFooter: typeof import('./components/SiteFooter.vue')['default'] SmartLaunchScreen: typeof import('./components/SmartLaunchScreen.vue')['default'] + StudentLeavePanel: typeof import('./components/StudentLeavePanel.vue')['default'] VacantBedPicker: typeof import('./components/VacantBedPicker.vue')['default'] } export interface GlobalDirectives { diff --git a/web/src/components/StudentLeavePanel.vue b/web/src/components/StudentLeavePanel.vue new file mode 100644 index 0000000..f340bbd --- /dev/null +++ b/web/src/components/StudentLeavePanel.vue @@ -0,0 +1,85 @@ + + + + + diff --git a/web/src/views/ApprovalCenterView.vue b/web/src/views/ApprovalCenterView.vue index d18f5af..a0c9511 100644 --- a/web/src/views/ApprovalCenterView.vue +++ b/web/src/views/ApprovalCenterView.vue @@ -16,6 +16,7 @@ import { } from "@element-plus/icons-vue"; import http, { apiErrorMessage } from "../api/http"; import { useAuthStore } from "../stores/auth"; +import StudentLeavePanel from "../components/StudentLeavePanel.vue"; interface CourseOption { teachingTaskId: string; @@ -859,6 +860,8 @@ onMounted(async () => { + +