using System;
using System.Collections.Generic;
namespace XP.ReportEngine.Models
{
///
/// 报告上下文,包含生成报告所需的全部数据 | Report context containing all data needed for report generation
///
public class ReportContext
{
///
/// 报告元数据 | Report metadata
///
public ReportMetadata Metadata { get; set; }
///
/// 检测结果数据集合(按处理器类型分组)| Inspection result data grouped by processor type
///
public List ResultGroups { get; set; } = new();
///
/// 图像数据字典(键为 dataKey,值为图像数据)| Image data dictionary (key=dataKey, value=image data)
///
public Dictionary Images { get; set; } = new();
///
/// 自定义属性字典(用于数据绑定的扁平化键值对)| Custom properties for data binding
///
public Dictionary Properties { get; set; } = new();
}
///
/// 报告元数据 | Report metadata
///
public class ReportMetadata
{
public string ReportId { get; set; }
public DateTime InspectionDate { get; set; }
public string SampleName { get; set; }
public string OperatorName { get; set; }
public string Description { get; set; }
}
///
/// 检测结果分组 | Inspection result group
///
public class InspectionResultGroup
{
///
/// 处理器类型标识 | Processor type identifier
///
public string ProcessorType { get; set; }
///
/// 数据来源标识 | Data source identifier
///
public string SourceId { get; set; }
///
/// 分类结果(Pass/Fail)| Classification result
///
public string Classification { get; set; }
///
/// 结果键值对 | Result key-value pairs
///
public Dictionary Data { get; set; } = new();
///
/// 表格数据行(用于表格渲染)| Table data rows for table rendering
///
public List> TableRows { get; set; } = new();
}
}