Files
XplorePlane/XP.ReportEngine/Models/ReportRequest.cs
T

51 lines
2.2 KiB
C#

using System.Collections.Generic;
namespace XP.ReportEngine.Models
{
/// <summary>
/// 报告生成请求 | Report generation request
/// 封装外部调用方生成报告所需的全部输入参数
/// Encapsulates all input parameters needed by external callers to generate a report
/// </summary>
public class ReportRequest
{
/// <summary>
/// 处理器输出数据列表 | List of processor output data
/// </summary>
public List<ProcessorOutput> ProcessorOutputs { get; set; } = new();
/// <summary>
/// 报告元数据(产品名、操作员、描述等)| Report metadata (product name, operator, description, etc.)
/// </summary>
public ReportMetadata Metadata { get; set; }
/// <summary>
/// 额外图像数据(如工件整体图、自定义图像)| Additional image data (e.g., workpiece overview, custom images)
/// 键为 dataKey,值为图像数据
/// Key is dataKey, value is image data
/// </summary>
public Dictionary<string, ImageData> AdditionalImages { get; set; } = new();
/// <summary>
/// 输出文件路径(可选)| Output file path (optional)
/// 为空时根据 ReportConfig 和 FileNameParameters 自动生成
/// When empty, auto-generated based on ReportConfig and FileNameParameters
/// </summary>
public string OutputFilePath { get; set; }
/// <summary>
/// 文件名占位符参数(可选)| File name placeholder parameters (optional)
/// 用于 ReportConfig.FileNamePattern 中的占位符替换
/// Used for placeholder replacement in ReportConfig.FileNamePattern
/// </summary>
public Dictionary<string, string> FileNameParameters { get; set; } = new();
/// <summary>
/// 自定义属性(可选)| Custom properties (optional)
/// 额外的键值对数据,会合并到 ReportContext.Properties 中
/// Additional key-value data merged into ReportContext.Properties
/// </summary>
public Dictionary<string, object> CustomProperties { get; set; } = new();
}
}