using Exam.Infrastructure.Data.Interface;
using Exam.Infrastructure.Enums;
using Exam.Infrastructure.Extensions;
using Hotline.Share.Dtos.Questions;
using Hotline.Share.Enums.Exams;
using Hotline.Share.Exams.Interface;
using System.ComponentModel;
using System.Text.Json.Serialization;

namespace Hotline.Share.Dtos.TestPapers
{
    /// <summary>
    /// 人工组卷试题
    /// </summary>
    [Description("人工组卷试题")]
    public class TestPaperItemDto : UpdateTestPaperItemDto
    {
        


        /// <summary>
        /// 难度
        /// </summary>
        [Description("难度")]
        public string DifficultyLevelDesc
        {
            get
            {
                return DifficultyLevel.GetDescription();
            }
        }

        /// <summary>
        /// 题型
        /// </summary>
        [Description("题型")]
        public string QuestionTypeDesc
        {
            get
            {
                return QuestionType.GetDescription();
            }
        }

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

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

    /// <summary>
    /// 人工组卷试题
    /// </summary>
    [Description("人工组卷试题")]
    public class AddTestPaperItemDto : IAddRequest, IOperationStatus
    {
        /// <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; }

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

        /// <summary>
        /// 操作状态        
        /// </summary>
        [Description("操作状态")]
        public EEOperationStatus OperationStatus { get; set; }


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

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

    }

    /// <summary>
    /// 人工组卷试题
    /// </summary>
    [Description("人工组卷试题")]
    public class UpdateTestPaperItemDto : AddTestPaperItemDto, IActionRequest
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }

        /// <summary>
        /// 关联课件
        /// </summary>
        [Description("关联课件")]
        [JsonIgnore]
        public new List<UpdateTestPaperItemSourcewareDto> TestPaperItemSourcewareDtos { get; set; }

        /// <summary>
        /// 关联知识
        /// </summary>
        [Description("关联知识")]
        [JsonIgnore]
        public new List<UpdateTestPaperItemKnowladgeDto> TestPaperItemKnowladgeDtos { get; set; }
    }
}
