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

namespace Hotline.Share.Dtos.TestPapers
{
    /// <summary>
    /// 试卷
    /// </summary>
    [Description("试卷")]
    public class TestPaperDto : UpdateTestPaperDto
    {
     
        /// <summary>
        /// 试卷详情
        /// </summary>
        [Description("试卷详情")]
        public new List<TestPaperItemDto> TestPaperItemDtos { get; set; }

        /// <summary>
        /// 试卷组卷规则
        /// </summary>
        [Description("试卷组卷规则")]
        [JsonIgnore]
        public new List<TestPaperRuleDto> TestPaperRuleDtos { get; set; }
    }


    /// <summary>
    /// 试卷
    /// </summary>
    [Description("试卷")]
    public class AddTestPaperDto : IAddRequest
    {

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

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

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

        /// <summary>
        /// 组卷方式
        /// </summary>
        [Description("组卷方式")]
        public EExamMode Mode { get; set; }

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

        /// <summary>
        /// 是否自动生成
        /// </summary>
        [Description("是否自动生成")]
        public bool IsAuto { get; set; }

        /// <summary>
        /// 试卷详情
        /// </summary>
        [Description("试卷详情")]
        public List<AddTestPaperItemDto> TestPaperItemDtos { get; set; }

        /// <summary>
        /// 试卷组卷规则
        /// </summary>
        [Description("试卷组卷规则")]
        [JsonIgnore]
        public List<AddTestPaperRuleDto> TestPaperRuleDtos { get; set; }
    }


    /// <summary>
    /// 试卷
    /// </summary>
    [Description("试卷")]
    public class UpdateTestPaperDto : AddTestPaperDto, IActionRequest
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Description("主键")]
        public string Id { get; set; }

        /// <summary>
        /// 试卷详情
        /// </summary>
        [Description("试卷详情")]
        public new List<UpdateTestPaperItemDto> TestPaperItemDtos { get; set; }

        /// <summary>
        /// 试卷组卷规则
        /// </summary>
        [Description("试卷组卷规则")]
        [JsonIgnore]
        public new List<UpdateTestPaperRuleDto> TestPaperRuleDtos { get; set; }
    }
}
