feat: enforce tenant isolation and shared question bank

This commit is contained in:
2026-07-27 16:59:12 +08:00
parent 28e9a9fa41
commit db4c7b4496
137 changed files with 6402 additions and 112274 deletions

View File

@@ -0,0 +1,31 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using Tiku.Application.Catalog;
using Tiku.Domain.Catalog;
using Tiku.Domain.Common;
using Tiku.Domain.Content;
namespace Tiku.Api.Contracts;
public sealed class CreateTaxonomyNodeDto
{
public Guid? ParentId { get; set; }
public QuestionSource? ParentSource { get; set; }
[Required]
public TaxonomyNodeType NodeType { get; set; }
[Required, StringLength(100)]
public string Code { get; set; } = string.Empty;
[Required, StringLength(300)]
public string Name { get; set; } = string.Empty;
public int SortOrder { get; set; }
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
public CreateTaxonomyNodeCommand ToCommand() => new(
ParentId,
ParentSource,
NodeType,
Code,
Name,
SortOrder,
Metadata);
}