using System;
using System.Threading.Tasks;
using Abp.Domain.Services;
using YGNT.QuestionLibrary.Core.Questions;
using YGNT.QuestionLibrary.Core.Tasks.Domain.Dto;

namespace YGNT.QuestionLibrary.Core.Tasks.Domain
{
    /// <summary>
    /// 任务管理(进入任务队列)
    /// </summary>
    public interface ITaskManager : IDomainService
    {
        /// <summary>
        /// 执行试题解析
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        Task EnqueueQuestionResolveAsync(long taskId);

        /// <summary>
        /// 执行试卷生成
        /// </summary>
        /// <param name="taskId"></param>
        /// <param name="paperProduce">试卷生成参数</param>
        /// <returns></returns>
        Task EnqueuePaperProduceAsync(long taskId, PaperProduceDto paperProduce);

        /// <summary>
        /// 执行试题转换
        /// </summary>
        /// <param name="questionOrigin"></param>
        /// <returns></returns>
        Task EnqueueQuestionConvertAsync(QuestionOrigin questionOrigin);

        /// <summary>
        /// 执行试题替换
        /// </summary>
        /// <param name="question"></param>
        /// <param name="fileId"></param>
        /// <returns></returns>
        Task EnqueueQuestionReplaceAsync(Question question, Guid fileId);
    }
}