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

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

        /// <summary>
        /// 培训标题
        /// </summary>
        [Description("培训标题")]
        public string TrainName { get; set; }

        /// <summary>
        /// 是否完成培训
        /// </summary>
        [Description("是否完成培训")]
        public bool IsComplete { get; set; }

        /// <summary>
        /// 是否完成培训
        /// </summary>
        [Description("是否完成培训")]
        public string IsCompleteDes
        {
            get
            {
                return (IsComplete ? 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("培训时间")]
        [JsonIgnore]
        public DateTime TrainTime { get; set; }
    }

    public class TrainResultPagedViewResponse : PageViewResponse<TrainResultViewResponse>
    {

    }
}
