using Exam.Infrastructure.Data.Interface;
using Exam.Infrastructure.Extensions;
using Hotline.Share.Enums.Exams;
using System.ComponentModel;

namespace Exam.Share.ViewResponses.Question
{
    public class QuestionViewResponse:IViewResponse
    {
        /// <summary>
        /// 题型
        /// </summary>
        [Description("题型")]
        public string QuestionTypeDesc
        {
            get
            {
                return QuestionType.GetDescription();
            }
        }

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

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

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

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

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

        /// <summary>
        /// 正式可用
        /// </summary>
        [Description("正式可用")]
        public string FormalEnableDes
        {
            get
            {
                return (FormalEnable ? 1 : 0).ToEnum<ECheck>().GetDescription();
            }
        }

        /// <summary>
        /// 模拟可用
        /// </summary>
        [Description("模拟可用")]

        public string SimulateEnableDes
        {
            get
            {
                return (SimulateEnable ? 1 : 0).ToEnum<ECheck>().GetDescription();
            }
        }

        /// <summary>
        /// 正式可用
        /// </summary>
        [Description("正式可用")]
        public bool FormalEnable { get; set; }

        /// <summary>
        /// 模拟可用
        /// </summary>
        [Description("模拟可用")]

        public bool SimulateEnable { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Description("状态")]
        public EPublicStatus Status { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Description("排序")]
        public int SortIndex { get; set; }

        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]

        public string Id { get; set; }
    }
}
