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