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

namespace YGNT.QuestionLibrary.Core.KnowledgePoints.Domain
{
    public interface IKnowledgePointManager : IDomainService
    {
        /// <summary>
        /// 移动知识点节点
        /// </summary>
        /// <param name="source">要移动的知识点</param>
        /// <param name="targetParent">目标知识点(P)</param>
        /// <returns></returns>
        Task MoveToAsync(KnowledgePoint source, KnowledgePoint targetParent);

        /// <summary>
        /// 检查知识点名称是否被占用
        /// </summary>
        /// <param name="name"></param>
        /// <param name="parentId"></param>
        /// <returns></returns>
        Task CheckNameAsync(string name, long? parentId);
    }
}