using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Domain.Services;

namespace YGNT.QuestionLibrary.Core.KnowledgePoints.Domain
{
    public interface IKnowledgePointTreePathManager : IDomainService
    {
        /// <summary>
        /// 获取知识点名称路径
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<string> GetNamePathAsync(long id);

        /// <summary>
        /// 获取所有的祖先节点
        /// </summary>
        /// <param name="descendant"></param>
        /// <returns></returns>
        Task<List<KnowledgePointTreePath>> GetAncestorAsync(long descendant);

        /// <summary>
        /// 创建知识点路径
        /// </summary>
        /// <param name="knowledgePoint"></param>
        /// <returns></returns>
        Task<List<KnowledgePointTreePath>> CreateTreePathAsync(KnowledgePoint knowledgePoint);

        /// <summary>
        /// 获取所有的后代节点(包括了自己)
        /// </summary>
        /// <param name="ancestor"></param>
        /// <returns></returns>
        Task<List<KnowledgePointTreePath>> GetDescendantAsync(long ancestor);

    }
}