using System.ComponentModel;
using Hotline.Exams.Base;
using Hotline.Share.Enums.Exams;
using SqlSugar;

namespace Hotline.Exams.Questions
{
    /// <summary>
    /// 试题
    /// </summary>
    [Description("试题")]
    public class ExamQuestion : ExamBusinessEntity
    {
        /// <summary>
        /// 题干
        /// </summary>
        [SugarColumn(ColumnDescription = "题干")]
        [Description("题干")]
        public string Title { get; set; }

        /// <summary>
        /// 试题类型
        /// </summary>
        [SugarColumn(ColumnDescription = "试题类型")]
        [Description("试题类型")]
        public EQuestionType QuestionType { get; set; }

        /// <summary>
        /// 难易程度
        /// </summary>
        [SugarColumn(ColumnDescription = "难易程度")]
        [Description("难易程度")]
        public EDifficultyLevel DifficultyLevel { get; set; }

        /// <summary>
        /// 正式可用
        /// </summary>
        [SugarColumn(ColumnDescription = "正式可用")]
        [Description("正式可用")]
        public bool FormalEnable { get; set; }

        /// <summary>
        /// 模拟可用
        /// </summary>
        [SugarColumn(ColumnDescription = "模拟可用")]
        [Description("模拟可用")]

        public bool SimulateEnable { get; set; }

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

        /// <summary>
        /// 权重
        /// </summary>
        [SugarColumn(ColumnDescription ="权重")]
        [Description("权重")]
        public int Weight { get; set; }

        [Navigate(NavigateType.OneToMany,nameof(ExamQuestionOptions.QuestionId))]
        public List<ExamQuestionOptions> QuestionOptionses { get; set; }

        [Navigate(NavigateType.OneToMany,nameof(ExamQuestionKnowladge.QuestionId))]
        public List<ExamQuestionKnowladge> QuestionKnowladges { get; set; }

        [Navigate(NavigateType.OneToMany,nameof(ExamQuestionSourceware.QuestionId))]
        public List<ExamQuestionSourceware> QuestionSourcewares { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(ExamQuestionAnswer.QuestionId))]
        public List<ExamQuestionAnswer> QuestionAnswers { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(ExamQuestionTag.QuestionId))]
        public List<ExamQuestionTag> QuestionTags { get; set; }
    }
}
