using System.Collections.Generic;
namespace XP.ReportEngine.Models
{
///
/// 报告模板定义 | Report template definition
///
public class ReportTemplate
{
public DocumentSettings Document { get; set; }
public List Pages { get; set; } = new();
public Dictionary Styles { get; set; } = new();
}
public class DocumentSettings
{
public string PageSize { get; set; } = "A4";
public string Orientation { get; set; } = "Portrait";
public MarginSettings Margins { get; set; } = new();
///
/// 页眉配置(仅内容页显示,首页不显示)| Header config (content pages only, not homepage)
///
public HeaderFooterSettings Header { get; set; }
///
/// 页脚配置(仅内容页显示,首页不显示)| Footer config (content pages only, not homepage)
///
public HeaderFooterSettings Footer { get; set; }
}
public class MarginSettings
{
public float Top { get; set; } = 20f;
public float Bottom { get; set; } = 20f;
public float Left { get; set; } = 20f;
public float Right { get; set; } = 20f;
}
///
/// 页眉/页脚配置 | Header/Footer settings
///
public class HeaderFooterSettings
{
///
/// 是否启用 | Whether enabled
///
public bool Enabled { get; set; } = true;
///
/// 左侧文本行(支持 ${} 绑定表达式)| Left-side text lines with binding expressions
///
public List Left { get; set; } = new();
///
/// 右侧文本行(支持 ${} 绑定表达式)| Right-side text lines with binding expressions
///
public List Right { get; set; } = new();
///
/// 右侧图像 dataKey(如 logo)| Right-side image dataKey (e.g. logo)
///
public string RightImageKey { get; set; }
///
/// 左侧图像 dataKey | Left-side image dataKey
///
public string LeftImageKey { get; set; }
///
/// 字体大小 | Font size
///
public float FontSize { get; set; } = 8f;
///
/// 字体颜色 | Font color
///
public string Color { get; set; } = "#666666";
///
/// 是否显示分隔线 | Whether to show separator line
///
public bool ShowLine { get; set; } = true;
}
public class TemplatePage
{
///
/// 页面类型:homepage / metricData / defectDetails / bgaInspection / voidInspection / viaFillInspection
///
public string Type { get; set; }
public List Elements { get; set; } = new();
}
}