forked from gongxuegit/tiku-backend.net
feat: enforce tenant isolation and shared question bank
This commit is contained in:
31
Tiku.Api/Contracts/TaxonomyDtos.cs
Normal file
31
Tiku.Api/Contracts/TaxonomyDtos.cs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user