namespace Hotline.Share.Dtos.Knowledge
{
    /// <summary>
    /// 编辑
    /// </summary>
    public record UpdateKnowledgeTypeDto : AddKnowledgeTypeDto
    {
        /// <summary>
        /// ID
        /// </summary>
        public string Id { get; set; }
    }

    /// <summary>
    ///新增
    /// </summary>
    public record AddKnowledgeTypeDto
    {
        /// <summary>
        /// 类型名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public string? ParentId { get; set; } 

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; } = 0;

        public List<AddKnowledgeTypeOrgDto>? TypeOrgDtos { get; set; }

    }

    /// <summary>
    /// 初始化返回数据
    /// </summary>
    public record KnowledgeTypeDto
    {
        /// <summary>
        /// ID
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 类型名称拼接(所有父级分类名称)
        /// <example>
        /// A类型/A.1类型/A.1.1类型
        /// </example>
        /// </summary>
        public string SpliceName { get; set; }

		/// <summary>
		/// 类型名称
		/// </summary>
		public string Name { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsEnable { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        public string ParentId { get; set; }

        /// <summary>
        /// 树形分类
        /// </summary>
        public List<TreeListDto> TreeLists { get; set; } = new();
    }
}
