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

namespace Hotline.Share.Dtos.ExamManages
{
    /// <summary>
    /// 考试试题
    /// </summary>
    [Description("考试试题")]
    public class ExamQuestionDto : ActionRequest
    {
        /// <summary>
        /// 题干
        /// </summary>
        [Description("题干")]
        public string Title { get; set; }

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

        /// <summary>
        /// 分数
        /// </summary>
        [Description("分数")]
        public int? Score { get; set; }

        /// <summary>
        /// 考试选项
        /// </summary>
        [Description("考试选项")]
        public List<ExamQuestionOptionsDto> QuestionOptions {get;set;}

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

    /// <summary>
    /// 查看考试试题
    /// </summary>
    [Description("查看考试试题")]
    public class ViewExamQuestionDto : ExamQuestionDto
    {
        /// <summary>
        /// 实际得分
        /// </summary>
        [Description("实际得分")]
        public int? RealScore { get; set; }

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

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

        /// <summary>
        /// 试题关联知识
        /// </summary>
        [Description("试题关联知识")]
        public List<QuestionKnowladgeDto> QuestionKnowladgeDtos { get; set; }

        /// <summary>
        /// 试题课件
        /// </summary>
        [Description("试题课件")]
        public List<QuestionSourcewareDto> QuestionSourcewareDtos { get; set; }

        /// <summary>
        /// 查看试题选项
        /// </summary>
        [Description("查看试题选项")]
        public new List<ViewQuestionOptionDto> QuestionOptions { get; set; }

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