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

namespace Exam.Share.ViewResponses.Exam
{
    public class UserExamResultViewResponse : IViewResponse
    {
        /// <summary>
        /// 参考人员
        /// </summary>
        [Description("参考人员")]
        public string UserName { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        [Description("部门名称")]
        public string OrgName { get; set; }

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

        /// <summary>
        /// 总分
        /// </summary>
        [Description("总分")]
        public int TotalScore { get; set; }

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

        /// <summary>
        /// 考试分数
        /// </summary>
        [Description("考试分数")]
        public int Score { 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; }

        /// <summary>
        /// 考试状态
        /// </summary>
        [Description("考试状态")]
        public EExamStatus ExamStatus { get; set; }

        /// <summary>
        /// 是否考试合格
        /// </summary>
        [Description("是否考试合格")]
        public bool? IsSuccess { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Description("开始时间")]
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Description("结束时间")]
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 考试时长
        /// </summary>
        [Description("考试时长")]
        public int TimeSpan { get; set; }

        /// <summary>
        /// 考试类型
        /// </summary>
        [Description("考试类型")]
        public string ExamTypeDesc
        {
            get
            {
                return ExamType.GetDescription();
            }
        }

        /// <summary>
        /// 考试类型
        /// </summary>
        [Description("考试类型")]
        public EExamType ExamType { get; set; }

        /// <summary>
        /// 考试ID
        /// </summary>
        [Description("考试ID")]
        public string ExamId { get; set; }

        /// <summary>
        /// 是否阅卷
        /// </summary>
        [Description("是否阅卷")]
        public bool IsCheck { get; set; }

        /// <summary>
        /// 是否重考
        /// </summary>
        [Description("是否重考")]
        public bool? IsReExam { get; set; }

        /// <summary>
        /// 能否重考
        /// </summary>
        [Description("能否重考")]
        public bool CanReExam { get; set; }
    }

    public class GradingResultViewResponse : IViewResponse
    {

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

        /// <summary>
        /// 考试编号
        /// </summary>
        [Description("考试编号")]
        public string ExamCode { get; set; }

        /// <summary>
        /// 总分
        /// </summary>
        [Description("总分")]
        public int TotalScore { get; set; }

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

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

        /// <summary>
        /// 是否已阅卷
        /// </summary>
        [Description("是否已阅卷")]
        public bool IsCheck { 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; }

        /// <summary>
        /// 考试状态
        /// </summary>
        [Description("考试状态")]
        public EExamStatus ExamStatus { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Description("备注")]
        public string Remark { get; set; }
    }
}
