using YBEE.EQM.Core;

namespace YBEE.EQM.Application;

/// <summary>
/// 监测机构上报类型输出参数
/// </summary>
public class ExamOrgDataReportOutput
{
    /// <summary>
    /// 主键
    /// </summary>
    [Required]
    public int Id { get; set; }
    /// <summary>
    /// 监测机构ID
    /// </summary>
    [Required]
    public int ExamOrgId { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 上报类型
    /// </summary>
    [Required]
    public DataReportType Type { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public DataReportStatus Status { get; set; } = DataReportStatus.UNREPORT;
    /// <summary>
    /// 上报人用户ID
    /// </summary>
    public int? ReportSysUserId { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? ReportTime { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    public string Remark { get; set; }

    /// <summary>
    /// 佐证材料列表
    /// </summary>
    public List<AttachmentItem> AttachmentList { get; set; } = new();

    /// <summary>
    /// 监测机构
    /// </summary>
    public ExamOrgOutput ExamOrg { get; set; }
    /// <summary>
    /// 上报人
    /// </summary>
    public SysUserLiteOutput ReportSysUser { get; set; }
}

/// <summary>
/// 监测计划及机构上报类型联合输出参数
/// </summary>
public class ExamOrgDataReportUnionOutput
{
    /// <summary>
    /// 监测计划上报类型ID
    /// </summary>
    [Required]
    public int ExamDataReportId { get; set; }
    /// <summary>
    /// 监测计划的上报类型
    /// </summary>
    public ExamDataReportOutput ExamDataReport { get; set; }
    /// <summary>
    /// 监测机构上报类型ID
    /// </summary>
    public int? ExamOrgDataReportId { get; set; }
    /// <summary>
    /// 监测机构的上报类型
    /// </summary>
    public ExamOrgDataReportOutput ExamOrgDataReport { get; set; }
    /// <summary>
    /// 监测计划
    /// </summary>
    public ExamPlanOutput ExamPlan { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 是否已过期
    /// </summary>
    [Required]
    public bool IsExpired { get; set; }
}
/// <summary>
/// 机构监测计划上报输出参数
/// </summary>
public class ExamPlanOrgDataReportOutput
{
    /// <summary>
    /// 行号
    /// </summary>
    [Required]
    public int RowNumber { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public int ExamPlanId { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public string ExamPlanFullName { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public string ExamPlanName { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public string ExamPlanShortName { get; set; }
    /// <summary>
    /// 监测计划ID
    /// </summary>
    [Required]
    public ExamStatus ExamPlanStatus { get; set; }
    /// <summary>
    /// 学段
    /// </summary>
    [Required]
    public EducationStage EducationStage { get; set; }
    /// <summary>
    /// 学期ID
    /// </summary>
    [Required]
    public short SemesterId { get; set; }
    /// <summary>
    /// 机构ID
    /// </summary>
    [Required]
    public short SysOrgId { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    [Required]
    public DateTime BeginTime { get; set; }
    /// <summary>
    /// 结束时间
    /// </summary>
    [Required]
    public DateTime EndTime { get; set; }
    /// <summary>
    /// 上报类型
    /// </summary>
    [Required]
    public DataReportType Type { get; set; }
    /// <summary>
    /// 监测状态
    /// </summary>
    [Required]
    public ExamStatus ExamStatus { get; set; }
    /// <summary>
    /// 状态
    /// </summary>
    [Required]
    public DataReportStatus Status { get; set; } = DataReportStatus.UNREPORT;
    /// <summary>
    /// 上报人用户ID
    /// </summary>
    public int? ReportSysUserId { get; set; }
    /// <summary>
    /// 上报人
    /// </summary>
    public string ReportSysUserName { get; set; }
    /// <summary>
    /// 开始时间
    /// </summary>
    public DateTime? ReportTime { get; set; }
}

/// <summary>
/// 监测机构上报数据审核项
/// </summary>
public class ExamOrgDataReportAuditOutput
{
    /// <summary>
    /// 机构ID
    /// </summary>
    public short Id { get; set; }
    /// <summary>
    /// 机构全称
    /// </summary>
    public string FullName { get; set; }
    /// <summary>
    /// 机构名称
    /// </summary>
    public string Name { get; set; }
    /// <summary>
    /// 机构代码
    /// </summary>
    public string Code { get; set; }
    /// <summary>
    /// 上报时间
    /// </summary>
    public DateTime ReportTime { get; set; }
    /// <summary>
    /// 数量
    /// </summary>
    public int Count { get; set; } = 0;
}

