using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using YGNT.Infrastructure.Model;
using YGNT.QuestionLibrary.Core.Models;
using YGNT.QuestionLibrary.Core.Papers;
using YGNT.QuestionLibrary.Papers.Dto;

namespace YGNT.QuestionLibrary.Papers
{
    /// <summary>
    /// 试卷试题管理
    /// </summary>
    public interface IPaperQuestionAppService : IApplicationService
    {
        /// <summary>
        /// 获取试卷所有试题
        /// </summary>
        /// <param name="paperId"></param>
        /// <returns></returns>
        Task<List<PaperQuestionDto>> GetListAsync(int paperId);


        /// <summary>
        /// 给试卷添加试题
        /// </summary>
        /// <param name="paperId"></param>
        /// <param name="create"></param>
        /// <returns></returns>
        Task<List<PaperQuestionDto>> AppendAsync(int paperId, List<AppendPaperQuestionDto> create);

        /// <summary>
        /// 试题排序
        /// </summary>
        /// <param name="paperQuestionId"></param>
        /// <param name="sortType"></param>
        /// <returns>sort</returns>
        Task<int> SortAsync(long paperQuestionId, SortType sortType);

        /// <summary>
        /// 删除试题
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAsync(long id);

        /// <summary>
        /// 删除试题(批量)
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task DeleteListAsync(List<long> idList);
    }
}