Files
tiku-backend.net/Tiku.Domain/Catalog/TaxonomyEntities.cs
xiong c497a3ca8d
Some checks failed
ci / release-gate (push) Has been cancelled
清理代码
2026-08-03 12:31:39 +08:00

37 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 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 Guid TenantId { get; set; }
}
public enum TaxonomyNodeType
{
Subject,
Chapter,
KnowledgePoint,
Paper,
Custom
}