using Exam.Share;
using Exam.Share.ViewResponses.Practices;
using Hotline.Exams.Practices;
using Hotline.Repository.SqlSugar.Exam.Interface;
using Hotline.Share.Dtos.Practices;
using Hotline.Share.Requests.Exam;
using Hotline.Share.Requests.TestPaper;
using Hotline.Share.ViewResponses.Exam;
using Hotline.Share.ViewResponses.Practices;

namespace Hotline.Application.Exam.Interface.Practices
{
    public interface IPracticeService:IQueryService<PracticeViewResponse, PracticeDto,PracticePagedRequest>,IApiService<AddPracticeDto,UpdatePracticeDto,ExamPractice>
    {
        /// <summary>
        /// 获取自我练习试题类型和Id
        /// </summary>
        /// <param name="examQuestionRequest"></param>
        /// <returns></returns>
        Task<List<PracticeQuestionViewResponse>> GetPracticeQuestionViewResponses(PracticeQuestionGroupRequest practiceQuestionGroupRequest);

        /// <summary>
        /// 查看自我练习试题类型和Id
        /// </summary>
        /// <param name="practiceQuestionGroupRequest"></param>
        /// <returns></returns>
        Task<List<PracticeQuestionViewResponse>> GetViewPracticeQuestions(PracticeQuestionGroupRequest practiceQuestionGroupRequest);

        /// <summary>
        /// 获取练习试题
        /// </summary>
        /// <param name="practiceQuestionRequest"></param>
        /// <returns></returns>
        Task<PracticeQuestionDto> GetPracticeQuestion(PracticeQuestionRequest practiceQuestionRequest);

        /// <summary>
        /// 查看练习习题
        /// </summary>
        /// <param name="practiceQuestionRequest"></param>
        /// <returns></returns>
        Task<ViewPracticeQuestionDto> ViewPracticeQuestion(PracticeQuestionRequest practiceQuestionRequest);

        /// <summary>
        /// 练习
        /// </summary>
        /// <param name="practiceAnswerDto"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task<PracticeQuestionDto> Practice(SubmitPracticeDto submitPracticeDto,CancellationToken cancellationToken);

        /// <summary>
        /// 完成培训记录
        /// </summary>
        /// <param name="completePracticeRecordDto"></param>
        /// <param name="cancellationToken"></param>
        /// <returns></returns>
        Task Complete(CompletePracticeRecordDto completePracticeRecordDto, CancellationToken cancellationToken);

        /// <summary>
        /// 根据标签获取试题数
        /// </summary>
        /// <param name="tagQuestionCountForPracticeRequest"></param>
        /// <returns></returns>
        Task<TagQuestionCountViewResponse> GetTagQuestionCount(TagQuestionCountForPracticeRequest tagQuestionCountForPracticeRequest);

    }
}
