using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 监测计划简要输出参数
/// </summary>
public class ExamPlanLiteOutput : DEntityOutput
{
    /// <summary>
    /// 学段：学前小初高
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    [Required]
    public short SemesterId { get; set; }
    /// <summary>
    /// 序，同一学段、学期、监测类型从1开始计数
    /// </summary>
    [Required]
    public short Sequence { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 全称
    /// </summary>
    [Required]
    public string FullName { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
    /// <summary>
    /// 监测配置
    /// </summary>
    [Required]
    public string Config { get; set; }

    /// <summary>
    /// 是否已固定监测抽样方案
    /// </summary>
    [Required]
    public bool IsFixedExamSample { get; set; }


    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public ExamStatus Status { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? BeginTime { get; set; }
    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }
}

/// <summary>
/// 监测计划输出参数
/// </summary>
public class ExamPlanOutput : DEntityOutput
{
    /// <summary>
    /// 学段：学前小初高
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    [Required]
    public short SemesterId { get; set; }
    /// <summary>
    /// 序，同一学段、学期、监测类型从1开始计数
    /// </summary>
    [Required]
    public short Sequence { get; set; }
    /// <summary>
    /// 名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 全称
    /// </summary>
    [Required]
    public string FullName { get; set; }
    /// <summary>
    /// 简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }
    /// <summary>
    /// 监测配置
    /// </summary>
    [Required]
    public string Config { get; set; }

    /// <summary>
    /// 是否已固定监测抽样方案
    /// </summary>
    [Required]
    public bool IsFixedExamSample { get; set; }


    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public ExamStatus Status { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? BeginTime { get; set; }
    /// <summary>
    /// 结束时间
    /// </summary>
    public DateTime? EndTime { get; set; }


    /// <summary>
    /// 学期
    /// </summary>
    public SemesterOutput Semester { get; set; }
    /// <summary>
    /// 监测年级列表
    /// </summary>
    public List<ExamGradeOutput> ExamGrades { get; set; }
    /// <summary>
    /// 监测上报类型列表
    /// </summary>
    public List<ExamDataReportOutput> ExamDataReports { get; set; }
    /// <summary>
    /// 监测发布内容列表
    /// </summary>
    public List<ExamDataPublishOutput> ExamDataPublishs { get; set; }
}

/// <summary>
/// 计划内审核输出参数
/// </summary>
public class ExamPlanAuditOutput
{
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int Id { get; set; }
    /// <summary>
    /// 监测计划名称
    /// </summary>
    [Required]
    public string Name { get; set; }
    /// <summary>
    /// 监测计划全称
    /// </summary>
    [Required]
    public string FullName { get;set; }
    /// <summary>
    /// 监测计划简称
    /// </summary>
    [Required]
    public string ShortName { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    [Required]
    public short SemesterId { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public ExamStatus Status { get; set; }

    /// <summary>
    /// 机构数量
    /// </summary>
    [Required]
    public int OrgCount { get; set; } = 0;
    /// <summary>
    /// 总数量
    /// </summary>
    [Required]
    public int TotalCount { get; set; } = 0;
    /// <summary>
    /// 待审核数量
    /// </summary>
    [Required]
    public int AuditCount { get; set; } = 0;
    /// <summary>
    /// 已通过数量
    /// </summary>
    [Required]
    public int ApprovedCount { get; set; } = 0;
    /// <summary>
    /// 已驳回数量
    /// </summary>
    [Required]
    public int RejectedCount { get; set; } = 0;
    /// <summary>
    /// 前期认定数量
    /// </summary>
    [Required]
    public int PreIdentifiedCount { get; set; } = 0;
}

/// <summary>
/// 计划内审核输出参数
/// </summary>
public class ExamPlanOrgAuditOutput
{
    /// <summary>
    /// 行号
    /// </summary>
    [Required]
    public int RowNumber { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测计划名称
    /// </summary>
    [Required]
    public string ExamPlanName { get; set; }
    /// <summary>
    /// 监测计划全称
    /// </summary>
    [Required]
    public string ExamPlanFullName { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    [Required]
    public short SemesterId { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    public short SysOrgId { get; set; }
    /// <summary>
    /// 机构全称
    /// </summary>
    public string SysOrgFullName { get; set; }
    /// <summary>
    /// 机构名称
    /// </summary>
    public string SysOrgName { get; set; }
    /// <summary>
    /// 机构代码
    /// </summary>
    public string SYsOrgCode { get;set; }
    /// <summary>
    /// 上报时间
    /// </summary>
    [Required]
    public DateTime ReportTime { get; set; }

    /// <summary>
    /// 计划状态
    /// </summary>
    public ExamStatus ExamStatus { get; set; }
    /// <summary>
    /// 上报状态
    /// </summary>
    public DataReportStatus DataReportStatus { get; set; }
    
    /// <summary>
    /// 总数量
    /// </summary>
    [Required]
    public int TotalCount { get; set; } = 0;
    /// <summary>
    /// 待审核数量
    /// </summary>
    [Required]
    public int AuditCount { get; set; } = 0;
    /// <summary>
    /// 已通过数量
    /// </summary>
    [Required]
    public int ApprovedCount { get; set; } = 0;
    /// <summary>
    /// 已驳回数量
    /// </summary>
    [Required]
    public int RejectedCount { get; set; } = 0;
    /// <summary>
    /// 前期认定数量
    /// </summary>
    [Required]
    public int PreIdentifiedCount { get; set; } = 0;
}