using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 添加试卷小题输入参数
/// </summary>
public class AddExamPaperQuestionMinorInput
{
    /// <summary>
    /// 双向细目表头ID
    /// </summary>
    [Required]
    public int ExamPaperId { get; set; }
    /// <summary>
    /// 题型类别
    /// </summary>
    public QuestionCatalog? QuestionCatalog { get; set; }
    /// <summary>
    /// 大题ID
    /// </summary>
    public int? ExamPaperQuestionMajorId { get; set; }
    /// <summary>
    /// 顺序
    /// </summary>
    [Required]
    public int Sequence { get; set; } = 0;
    /// <summary>
    /// 成绩文件列名
    /// </summary>
    [Required, StringLength(100)]
    public string ColumnName { get; set; }
    /// <summary>
    /// 小题
    /// </summary>
    [Required, StringLength(100)]
    public string Name { get; set; }
    /// <summary>
    /// 分值
    /// </summary>
    [Required]
    public decimal Score { get; set; } = 0;
    /// <summary>
    /// 知识模块
    /// </summary>
    [StringLength(200)]
    public string KnowledgeModule { get; set; }
    /// <summary>
    /// 知识点
    /// </summary>
    [StringLength(200)]
    public string KnowledgePoint { get; set; }
    /// <summary>
    /// 认知能力
    /// </summary>
    public CognitiveAbility? CognitiveAbility { get; set; }
    /// <summary>
    /// 预估难度
    /// </summary>
    public decimal EstimatedDifficulty { get; set; } = 0;
    /// <summary>
    /// 是否选做
    /// </summary>
    [Required]
    public bool IsChoose { get; set; } = false;
    /// <summary>
    /// 是否最小计分项
    /// </summary>
    [Required]
    public bool IsLeaf { get; set; } = true;
}
/// <summary>
/// 更新试卷小题输入参数
/// </summary>
public class UpdateExamPaperQuestionMinorInput : AddExamPaperQuestionMinorInput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public int Id { get; set; }
}

/// <summary>
/// 批量更新小题输入参数
/// </summary>
public class BatchUpdateExamPaperQuestionMinorInput
{
    /// <summary>
    /// 小题ID列表
    /// </summary>
    [Required]
    public List<int> Ids { get; set;}
    /// <summary>
    /// 大题ID
    /// </summary>
    public int? ExamPaperQuestionMajorId { get; set; }
    /// <summary>
    /// 分值
    /// </summary>
    [Required]
    public decimal Score { get; set; } = 0;
    /// <summary>
    /// 题型类别
    /// </summary>
    public QuestionCatalog? QuestionCatalog { get; set; }
}
