using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 监测特殊学生上报输出参数
/// </summary>
public class ExamSpecialStudentOutput : 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>
    public string StudentNumber { get; set; } = "";

    /// <summary>
    /// 姓名
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 证件类型
    /// </summary>
    [Required]
    public CertificateType CertificateType { get; set; }
    /// <summary>
    /// 证件号码
    /// </summary>
    public string IdNumber { get; set; } = "";
    /// <summary>
    /// 出生日期
    /// </summary>
    public DateTime? BirthDate { get; set; }
    /// <summary>
    /// 性别
    /// </summary>
    [Required]
    public Gender Gender { get; set; }


    /// <summary>
    /// 申请原因
    /// </summary>
    [Required]
    public string ApplyReason { 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<AttachmentItem> AttachmentList { get; set; } = new();
    /// <summary>
    /// 审核记录
    /// </summary>
    public List<AuditItem> AuditList { get; set; } = new();

    /// <summary>
    /// 往期是否已认定
    /// </summary>
    [Required]
    public bool IsPreIdentified { get; set; }

    /// <summary>
    /// 上一期总分科目数量
    /// </summary>
    public short? PreTotalCourse { get; set; }
    /// <summary>
    /// 上一期总分
    /// </summary>
    public decimal? PreTotalScore { get; set; }
}

/// <summary>
/// 监测特殊学生统计输出参数
/// </summary>
public class ExamSpecialStudentCountOutput
{
    /// <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 UploadExamSpecialStudentOutput : 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>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 证件类型
    /// </summary>
    [Required]
    public CertificateType CertificateType { get; set; }
    /// <summary>
    /// 证件类型名称
    /// </summary>
    public string CertificateTypeName { get; set; } = "";
    /// <summary>
    /// 证件号码
    /// </summary>
    public string IdNumber { get; set; } = "";
    /// <summary>
    /// 性别
    /// </summary>
    public Gender? Gender { get; set; } = Core.Gender.UNKNOWN;
    /// <summary>
    /// 性别名称
    /// </summary>
    public string GenderName { get; set; } = "";
    /// <summary>
    /// 学籍号
    /// </summary>
    public string StudentNumber { get; set; }
    /// <summary>
    /// 申请原因
    /// </summary>
    [Required]
    public string ApplyReason { get; set; }
    /// <summary>
    /// 家长姓名
    /// </summary>
    public string PatriarchName { get; set; }
    /// <summary>
    /// 家长电话
    /// </summary>
    [Required]
    public string PatriarchTel { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
}

