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

namespace Hotline.Exams.ExamManages
{
    /// <summary>
    /// 抽题规则
    /// </summary>
    [Description("抽题规则")]
    public class ExamExtractRule : ExamBusinessEntity
    {
        /// <summary>
        /// 规则名称
        /// </summary>
        [SugarColumn(ColumnDescription = "规则名称")]
        [Description("规则名称")]
        public string Name { get; set; }

        /// <summary>
        /// 规则编号
        /// </summary>
        [SugarColumn(ColumnDescription = "规则编号")]
        [Description("规则编号")]
        public string Code { get; set; }

        /// <summary>
        /// 规则类型
        /// </summary>
        [SugarColumn(ColumnDescription ="规则类型")]
        [Description("规则类型")]
        public EExamType RuleType { get; set; }

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

        [Navigate(NavigateType.OneToMany,nameof(ExamTagQuestion.RuleId))]
        public List<ExamTagQuestion> TagQuestions { get; set; }


        [Navigate(NavigateType.OneToMany,nameof(ExamRuleTag.RuleId))]
        public List<ExamRuleTag> RuleTags { get; set; }
    }
}
