using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 监测缺测替补上报输出参数
/// </summary>
public class ExamAbsentReplaceOutput : DEntityOutput
{
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 校区ID
    /// </summary>
    public short? SysOrgBranchId { get; set; }
    /// <summary>
    /// 监测年级ID
    /// </summary>
    [Required]
    public short ExamGradeId { get; set; }
    /// <summary>
    /// 年级ID
    /// </summary>
    [Required]
    public short GradeId { get; set; }
    /// <summary>
    /// 班级ID
    /// </summary>
    [Required]
    public long SchoolClassId { get; set; }
    /// <summary>
    /// 班号
    /// </summary>
    [Required]
    public short ClassNumber { get; set; }

    /// <summary>
    /// 缺测学生姓名
    /// </summary>
    [Required]
    public string AbsentName { get; set; }
    /// <summary>
    /// 缺测学生监测号
    /// </summary>
    [Required]
    public string AbsentExamNumber { get; set; }
    /// <summary>
    /// 缺测科目
    /// </summary>
    [Required]
    public string AbsentCourses { get; set; }
    /// <summary>
    /// 缺测原因
    /// </summary>
    [Required]
    public string AbsentReason { get; set; }

    /// <summary>
    /// 是否有替补
    /// </summary>
    [Required]
    public bool IsReplaced { get; set; } = false;
    /// <summary>
    /// 替补学生姓名
    /// </summary>
    public string ReplaceName { get; set; }
    /// <summary>
    /// 替补学生监测号
    /// </summary>
    public string ReplaceExamNumber { get; set; }

    /// <summary>
    /// 家长姓名
    /// </summary>
    public string PatriarchName { get; set; }
    /// <summary>
    /// 家长电话
    /// </summary>
    [Required]
    public string PatriarchTel { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public AuditStatus Status { get; set; }


    /// <summary>
    /// 班级
    /// </summary>
    public SchoolClassLiteOutput SchoolClass { get; set; }
    /// <summary>
    /// 校区
    /// </summary>
    public SysOrgLiteOutput SysOrgBranch { get; set; }
    /// <summary>
    /// 监测年级
    /// </summary>
    public ExamGradeOutput ExamGrade { get; set; }


    /// <summary>
    /// 缺测科目列表
    /// </summary>
    public List<CourseMiniOutput> AbsentCourseList { get; set; }
    /// <summary>
    /// 佐证材料列表
    /// </summary>
    public List<AttachmentItem> AttachmentList { get; set; } = new();
    /// <summary>
    /// 审核记录
    /// </summary>
    public List<AuditItem> AuditList { get; set; } = new();
}

/// <summary>
/// 监测缺测替补统计输出参数
/// </summary>
public class ExamAbsentReplaceCountOutput
{
    /// <summary>
    /// 班级列表
    /// </summary>
    public List<short> ClassNumberList { get; set; }
    /// <summary>
    /// 统计数据列表
    /// </summary>
    public List<dynamic> Items { get; set; }
    /// <summary>
    /// 总数
    /// </summary>
    public int Total { get; set; }
}

/// <summary>
/// 监测缺测替补批量上传行数据类型
/// </summary>
public class UploadExamAbsentReplaceOutput : UploadExamDataBase
{
    /// <summary>
    /// 监测年级ID
    /// </summary>
    public int? ExamGradeId { get; set; }
    /// <summary>
    /// 年级ID
    /// </summary>
    public short? GradeId { get; set; }
    /// <summary>
    /// 班级号
    /// </summary>
    [Required]
    public short ClassNumber { get; set; }

    /// <summary>
    /// 缺测学生姓名
    /// </summary>
    public string AbsentName { get; set; }
    /// <summary>
    /// 缺测学生监测号
    /// </summary>
    public string AbsentExamNumber { get; set; }
    /// <summary>
    /// 缺测科目
    /// </summary>
    public string AbsentCourseText { get; set; }
    /// <summary>
    /// 缺测科目
    /// </summary>
    public List<CourseMiniOutput> AbsentCourseList { get; set; } = new();
    /// <summary>
    /// 缺测原因
    /// </summary>
    public string AbsentReason { get; set; }

    /// <summary>
    /// 是否有替补
    /// </summary>
    public bool IsReplaced { get; set; } = false;
    /// <summary>
    /// 替补学生姓名
    /// </summary>
    public string ReplaceName { get; set; }
    /// <summary>
    /// 替补学生监测号
    /// </summary>
    public string ReplaceExamNumber { get; set; }

    /// <summary>
    /// 家长姓名
    /// </summary>
    public string PatriarchName { get; set; }
    /// <summary>
    /// 家长电话
    /// </summary>
    public string PatriarchTel { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}