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

namespace Exam.Share.ViewResponses.Train
{
    public class TrainTemplateViewResponse:IViewResponse
    {
        /// <summary>
        /// 模版标题
        /// </summary>
        [Description("模版标题")]
        public string Name { get; set; }

        /// <summary>
        /// 模版编码
        /// </summary>
        [Description("模版编码")]
        public string Code { get; set; }

        /// <summary>
        /// 是否包含习题
        /// </summary>
        [Description("是否包含习题")]
        public bool IsContainsPractice { get; set; }

        /// <summary>
        /// 是否包含习题
        /// </summary>
        [Description("是否包含习题")]
        public string IsContainsPracticeDes
        {
            get
            {
                return (IsContainsPractice ? 1 : 0).ToEnum<ECheck>().GetDescription();
            }
        }

        /// <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 string CreatorName { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Description("创建时间")]
        public DateTime CreationTime { get; set; }

        /// <summary>
        /// 创建部门
        /// </summary>
        [Description("创建部门")]
        public string CreatorOrgName { get; set; }
    }
}
