This commit is contained in:
biss committed 2026-09-07 19:34:03 +08:00
1 parent cec56564b5
commit ae075bda6d
32 files changed
+10052 -90

No files matched your search

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using Jiaowu.Api.Domain.Common;
namespace Jiaowu.Api.Domain.Academic;
public interface IArchivable
{
bool IsArchived { get; set; }
DateTime? ArchivedAt { get; set; }
Guid? ArchivedByUserId { get; set; }
string? ArchiveReason { get; set; }
}
// Append-only history; deliberately independent of entity deletion and login-account lifecycle.
public sealed class ArchiveEvent : EntityBase
{
[MaxLength(20)] public required string Kind { get; set; }
public Guid EntityId { get; set; }
public bool IsArchived { get; set; }
public Guid ActorUserId { get; set; }
[MaxLength(256)] public string? ActorName { get; set; }
[MaxLength(500)] public required string Reason { get; set; }
}
@@ -2,8 +2,14 @@ using Jiaowu.Api.Domain.Common;
namespace Jiaowu.Api.Domain.Academic;
public sealed class GradeSheet : EntityBase
public sealed class GradeSheet : EntityBase, IArchivable
{
public bool IsArchived { get; set; }
public DateTime? ArchivedAt { get; set; }
public Guid? ArchivedByUserId { get; set; }
[global::System.ComponentModel.DataAnnotations.MaxLength(500)]
public string? ArchiveReason { get; set; }
public Guid TeachingTaskId { get; set; }
public TeachingTask? TeachingTask { get; set; }
public decimal RegularWeight { get; set; } = 30;
@@ -84,8 +84,12 @@ public static class TeachingVenueNatureRules
(value & ExperimentTeaching) != 0;
}
public sealed class AcademicTerm : CatalogEntity
public sealed class AcademicTerm : CatalogEntity, IArchivable
{
public Guid? ArchivedByUserId { get; set; }
[global::System.ComponentModel.DataAnnotations.MaxLength(500)]
public string? ArchiveReason { get; set; }
public required string AcademicYear { get; set; }
public TermSeason Season { get; set; }
public DateOnly StartDate { get; set; }
Loaded 3 of 32 files, more files were not shown because too many files have changed in this diff. Show more