forked from xiongyuxing/tiku-backend.net
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System.Text.Json;
|
|
using Tiku.Domain.Common;
|
|
|
|
namespace Tiku.Domain.Catalog;
|
|
|
|
public sealed class TaxonomyNode : AuditableTenantEntity
|
|
{
|
|
public Guid? ParentOwnerTenantId { get; set; }
|
|
public Guid? ParentId { get; set; }
|
|
public TaxonomyNodeType NodeType { get; set; } = TaxonomyNodeType.KnowledgePoint;
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public string? Path { get; set; }
|
|
public int Depth { get; set; }
|
|
public int SortOrder { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
|
|
}
|
|
|
|
public sealed class QuestionTaxonomyAssignment : Entity, ITenantOwned
|
|
{
|
|
public Guid TenantId { get; set; }
|
|
public Guid QuestionId { get; set; }
|
|
public Guid TaxonomyOwnerTenantId { get; set; }
|
|
public Guid TaxonomyNodeId { get; set; }
|
|
public bool IsPrimary { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
}
|
|
|
|
public enum TaxonomyNodeType
|
|
{
|
|
Subject,
|
|
Chapter,
|
|
KnowledgePoint,
|
|
Paper,
|
|
Custom
|
|
}
|