using Exam.Infrastructure.Data.Entity;
using Exam.Infrastructure.Data.Interface;
using Hotline.Share.Dtos.Questions;
using Hotline.Share.Enums.Exams;
using System.ComponentModel;

namespace Hotline.Share.Dtos.Practices
{
    /// <summary>
    /// 练习题目
    /// </summary>
    [Description("练习题目")]
    public class PracticeQuestionDto: UpdatePracticeQuestionQuestionDto
    {
        [Description("练习题选项")]
        public  List<PracticeQuestionOptionsDto> PracticeQuestionOptionsDtos { get; set; }

        // <summary>
        /// 关联课件
        /// </summary>
        [Description("关联课件")]
        public  List<PracticeQuestionSourcewareDto> PracticeQuestionSourcewareDtos { get; set; }

        /// <summary>
        /// 关联知识
        /// </summary>
        [Description("关联知识")]
        public  List<PracticeQuestionKnowladgeDto> PracticeQuestionKnowladgeDtos { get; set; }
    }

    /// <summary>
    /// 练习题目
    /// </summary>
    [Description("练习题目")]
    public class ViewPracticeQuestionDto: PracticeQuestionDto
    {

        /// <summary>
        /// 参考答案
        /// </summary>
        [Description("参考答案")]
        public string Answer { get; set; }

        /// <summary>
        /// 练习题选项
        /// </summary>
        [Description("练习题选项")]
        public new List<GradingPracticeQuestionOptionsDto> PracticeQuestionOptionsDtos { get; set; }
    }

    public class AddPracticeQuestionDto : IAddRequest
    {
        /// <summary>
        /// 练习Id
        /// </summary>
        [Description("练习Id")]
        public string PracticeId { get; set; }

        /// <summary>
        /// 试题Id
        /// </summary>
        [Description("试题Id")]
        public string QuestionId { get; set; }

        /// <summary>
        /// 题干
        /// </summary>
        [Description("题干")]
        public string Title { get; set; }

        /// <summary>
        /// 题型
        /// </summary>
        [Description("题型")]
        public EQuestionType QuestionType { get; set; }

        /// <summary>
        /// 难易程度
        /// </summary>
        [Description("难易程度")]
        public EDifficultyLevel DifficultyLevel { get; set; }
    }

    public class UpdatePracticeQuestionQuestionDto : AddPracticeQuestionDto, IActionRequest
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }
    }
}
