95 lines
3.0 KiB
C#
95 lines
3.0 KiB
C#
using System.Text.Json;
|
|
using Tiku.Domain.Common;
|
|
|
|
namespace Tiku.Domain.Content;
|
|
|
|
public sealed class KnowledgeConcept : AuditableTenantEntity
|
|
{
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public string? Description { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class Curriculum : AuditableTenantEntity
|
|
{
|
|
public Guid BusinessLineId { get; set; }
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public Guid? CurrentVersionId { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class CurriculumVersion : Entity, ITenantOwned
|
|
{
|
|
public Guid CurriculumId { get; set; }
|
|
public int VersionNo { get; set; } = 1;
|
|
public string Name { get; set; } = string.Empty;
|
|
public int? ExamYear { get; set; }
|
|
public ContentDefinitionStatus Status { get; set; } = ContentDefinitionStatus.Draft;
|
|
public DateTimeOffset? PublishedAt { get; set; }
|
|
public Guid? CreatedBy { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
public Guid TenantId { get; set; }
|
|
}
|
|
|
|
public sealed class CurriculumNode : AuditableTenantEntity
|
|
{
|
|
public Guid CurriculumVersionId { get; set; }
|
|
public Guid? ParentId { get; set; }
|
|
public Guid? KnowledgeConceptId { get; set; }
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public CurriculumNodeKind Kind { get; set; } = CurriculumNodeKind.KnowledgePoint;
|
|
public int SortOrder { get; set; }
|
|
}
|
|
|
|
public sealed class CurriculumNodeClosure : Entity, ITenantOwned
|
|
{
|
|
public Guid CurriculumVersionId { get; set; }
|
|
public Guid AncestorNodeId { get; set; }
|
|
public Guid DescendantNodeId { get; set; }
|
|
public int Depth { get; set; }
|
|
public Guid TenantId { get; set; }
|
|
}
|
|
|
|
public sealed class ExamPaperSpecification : AuditableTenantEntity
|
|
{
|
|
public Guid BusinessLineId { get; set; }
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public Guid? CurrentVersionId { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class ExamPaperSpecificationVersion : Entity, ITenantOwned
|
|
{
|
|
public Guid SpecificationId { get; set; }
|
|
public int VersionNo { get; set; } = 1;
|
|
public int? ExamYear { get; set; }
|
|
public int DurationMinutes { get; set; }
|
|
public decimal TotalScore { get; set; }
|
|
public JsonElement Sections { get; set; } = JsonDefaults.Array();
|
|
public ContentDefinitionStatus Status { get; set; } = ContentDefinitionStatus.Draft;
|
|
public DateTimeOffset? PublishedAt { get; set; }
|
|
public Guid? CreatedBy { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
public Guid TenantId { get; set; }
|
|
}
|
|
|
|
public enum CurriculumNodeKind
|
|
{
|
|
Subject,
|
|
Chapter,
|
|
Section,
|
|
KnowledgePoint,
|
|
Custom
|
|
}
|
|
|
|
public enum ContentDefinitionStatus
|
|
{
|
|
Draft,
|
|
Published,
|
|
Retired
|
|
}
|