using Exam.Infrastructure.Data.Interface;
using Exam.Share;
using Hotline.Share.Dtos.ExamManages;
using Hotline.Share.Enums.Exams;
using System.ComponentModel;
using System.Runtime.CompilerServices;

namespace Exam.Application.Interface.Exam
{
    public class GradingExamQuestionDto : ExamQuestionDto
    {
        /// <summary>
        /// 答案
        /// </summary>
        [Description("答案")]
        public string Answer { get; set; }

        /// <summary>
        /// 答案
        /// </summary>
        [Description("正确答案")]

        public string CorrectAnswer { get; set; }

        /// <summary>
        /// 试题分数
        /// </summary>
        [Description("试题分数")]
        public int QuestionScore { set; get; }

    }

    public class GradingExamQuestionTempDto
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }

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

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

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

        /// <summary>
        /// 选项标签
        /// </summary>
        [Description("选项标签")]
        public string Label { get; set; }

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

        /// <summary>
        /// 用户考试明细Id
        /// </summary>
        [Description("用户考试明细Id")]
        public string UserExamItemId { get; set; }

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

        /// <summary>
        /// 选项内容
        /// </summary>
        [Description("选项内容")]
        public string Content { get; set; }

        /// <summary>
        /// 是否答案
        /// </summary>
        [Description("是否答案")]
        public bool IsAnswer { get; set; }

        /// <summary>
        /// 是否选中
        /// </summary>
        [Description("是否选中")]
        public bool IsSelected { get; set; }

        /// <summary>
        /// 试题分数
        /// </summary>
        [Description("试题分数")]
        public int QuestionScore { get; set; }

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

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

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

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

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

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

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

        /// <summary>
        /// 考试明细选项
        /// </summary>
        [Description("考试明细选项")]
        public List<UserExamItemOptionDto> UserExamItemOptionDtos { get; set; }

        /// <summary>
        /// 考试是否结束
        /// </summary>
        [Description("考试是否结束")]
        public bool IsCompleted { get; set; }
    }
}