using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 试卷简要输出参数
/// </summary>
public class ExamPaperLiteOutput : DEntityOutput
{
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测年级ID
    /// </summary>
    [Required]
    public int ExamGradeId { get; set; }
    /// <summary>
    /// 年级ID
    /// </summary>
    [Required]
    public short GradeId { get; set; }
    /// <summary>
    /// 监测科目ID
    /// </summary>
    [Required]
    public int ExamCourseId { get; set; }
    /// <summary>
    /// 科目ID
    /// </summary>
    [Required]
    public short CourseId { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 总分
    /// </summary>
    [Required]
    public decimal Score { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 问题
    /// </summary>
    public string Questions { get; set; }
    /// <summary>
    /// 建议
    /// </summary>
    public string Suggestions { get; set; }

    /// <summary>
    /// 双向细目表编制状态
    /// </summary>
    [Required]
    public AuditStatus TwclStatus { get; set; } = AuditStatus.UNSUBMIT;
    /// <summary>
    /// 双向细目表编制是否已提交
    /// </summary>
    public bool TwclSubmitted { get; set; } = false;
    /// <summary>
    /// 双向细目表编制审核记录
    /// </summary>
    public List<AuditItem> TwclAuditList { get; set; } = new();
    /// <summary>
    /// 双向细目表编制人用户ID
    /// </summary>
    public int? TwclSysUserId { get; set; }


    /// <summary>
    /// 问题建议撰写状态
    /// </summary>
    [Required]
    public AuditStatus SuggestionStatus { get; set; } = AuditStatus.UNSUBMIT;
    /// <summary>
    /// 问题建议是否已提交
    /// </summary>
    public bool SuggestionSubmitted { get; set; } = false;
    /// <summary>
    /// 问题建议撰写审核记录
    /// </summary>
    public List<AuditItem> SuggestionAuditList { get; set; } = new();
    /// <summary>
    /// 问题建议撰写人用户ID
    /// </summary>
    public int? SuggestionSysUserId { get; set; }


    /// <summary>
    /// 年级
    /// </summary>
    public GradeOutput Grade { get; set; }
    /// <summary>
    /// 科目
    /// </summary>
    public CourseOutput Course { get; set; }
    /// <summary>
    /// 监测计划
    /// </summary>
    public ExamPlanLiteOutput ExamPlan { get; set; }

    /// <summary>
    /// 双向细目表编制人
    /// </summary>
    public SysUserLiteOutput TwclSysUser { get; set; }
    /// <summary>
    /// 问题建议撰写人
    /// </summary>
    public SysUserLiteOutput SuggestionSysUser { get; set; }
}

/// <summary>
/// 试卷输出参数
/// </summary>
public class ExamPaperOutput : ExamPaperLiteOutput
{
    /// <summary>
    /// 小题列表
    /// </summary>
    public List<ExamPaperQuestionMinorOutput> ExamPaperQuestionMinors { get; set; }
}

/// <summary>
/// 试卷待处理监测计划输出参数
/// </summary>
public class ExamPaperTodoPlanOutput
{
    /// <summary>
    /// 监测计划ID
    /// </summary>
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测计划名称
    /// </summary>
    public string ExamPlanName { get; set; }
    /// <summary>
    /// 监测计划全称
    /// </summary>
    public string ExamPlanFullName { get; set; }
    /// <summary>
    /// 监测计划状态
    /// </summary>
    public ExamStatus ExamPlanStatus { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    public short SemsterId { get; set; }
    /// <summary>
    /// 总数量
    /// </summary>
    public int TotalCount { get; set; }
    /// <summary>
    /// 双向细目表编制已提交数量
    /// </summary>
    public int TwclUnsubmitCount { get; set; }
    /// <summary>
    /// 双向细目表编制未提交数量
    /// </summary>
    public int TwclSubmittedCount { get; set; }
    /// <summary>
    /// 问题建议撰写已提交数量
    /// </summary>
    public int SuggestionUnsubmitCount { get; set; }
    /// <summary>
    /// 问题建议撰写未提交数量
    /// </summary>
    public int SuggestionSubmittedCount { get; set; }
}

