using Exam.Infrastructure.Data.Entity;
using Exam.Infrastructure.Data.Interface;
using Exam.Infrastructure.Enums;
using Hotline.Share.Dtos.Questions;
using Hotline.Share.Dtos.Sourcewares;
using Hotline.Share.Exams.Interface;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Text.Json.Serialization;

namespace Hotline.Share.Dtos.Trains
{
    /// <summary>
    /// 培训记录
    /// </summary>
    [Description("培训记录")]
    public class TrainRecordDto:UpdateTrainRecordDto
    {
        /// <summary>
        /// 课件列表
        /// </summary>
        [Description("课件列表")]
        public List<SimpleKnowladgeDto> KnowladgeDtos { get; set; }

        /// <summary>
        /// 练习题
        /// </summary>
        [Description("练习题")]
        public List<SimpleQuestionDto> QuestionDtos { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Description("用户名")]
        public string Name { get; set; }

        /// <summary>
        /// 组织名称
        /// </summary>
        [Description("组织名称")]
        public string fullOrgName { get; set; }

    }

    /// <summary>
    /// 培训记录
    /// </summary>
    [Description("培训记录")]
    public class AddTrainRecordDto : IAddRequest,IOperationStatus
    {
        /// <summary>
        /// 培训计划Id
        /// </summary>
        [Description("培训计划Id")]
        public string TrainPlanId { get; set; }

        /// <summary>
        /// 培训模版Id
        /// </summary>
        [Description("培训模版Id")]
        public string TraimTemplateId { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        [Description("用户Id")]
        public string UserId { get; set; }

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

    /// <summary>
    /// 培训记录
    /// </summary>
    [Description("培训记录")]
    public class UpdateTrainRecordDto : AddTrainRecordDto,IActionRequest
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }
    }

    /// <summary>
    /// 培训
    /// </summary>
    [Description("培训")]
    public class AddTrainDto:IActionRequest,IOperationStatus
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }

        /// <summary>
        /// 培训习题答案
        /// </summary>
        [Description("培训习题答案")]
        public List<AddTrainRecordOptionDto> AddTrainRecordOptionDtos { get; set; }

        /// <summary>
        /// 答案
        /// </summary>
        public AddTrainRecordAnswerDto? AddTrainRecordAnswerDto { get; set; }

        /// <summary>
        /// 知识Id
        /// </summary>
        [Description("知识Id")]
        [JsonIgnore]
        public string TrainKnowladgeId { get; set; }

        ///// <summary>
        ///// 培训模版Id
        ///// </summary>
        //[Description("培训模版Id")]
        //public string TrainTemplateId { get; set; }

        /// <summary>
        /// 培训记录Id
        /// </summary>
        [Description("培训记录Id")]
        public string TrainRecordId { get; set; }

        /// <summary>
        /// 试题Id
        /// </summary>
        [Description("试题Id")]
        [JsonIgnore]
        public string QuestionId { get; set; }

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

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

    public class UpdateTrainDto : AddTrainDto
    {

    }
}
