d72b583319
[XP.ReportEngine] 模型与配置扩展:ReportOutputFormat 枚举:新增 Excel=1, Csv=2, Txt=3(显式序号,向后兼容);新增多格式相关配置加载。
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
namespace XP.ReportEngine.Models
|
||
{
|
||
/// <summary>
|
||
/// 报告生成选项 | Report generation options
|
||
/// </summary>
|
||
public class ReportGenerationOptions
|
||
{
|
||
/// <summary>
|
||
/// 模板文件路径 | Template file path
|
||
/// </summary>
|
||
public string TemplatePath { get; set; }
|
||
|
||
/// <summary>
|
||
/// 输出文件路径(可选,为 null 时仅返回 MemoryStream)| Output file path (optional)
|
||
/// </summary>
|
||
public string OutputFilePath { get; set; }
|
||
|
||
/// <summary>
|
||
/// 输出格式 | Output format
|
||
/// </summary>
|
||
public ReportOutputFormat Format { get; set; } = ReportOutputFormat.Pdf;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 报告输出格式 | Report output format
|
||
/// 说明:显式标注枚举序号,防止未来插入新值时导致原有值序号漂移,
|
||
/// 从而保持序列化/路由的向后兼容性。
|
||
/// Note: enum values are explicitly numbered to prevent ordinal drift when
|
||
/// new values are inserted in the future, preserving backward compatibility
|
||
/// for serialization/routing.
|
||
/// </summary>
|
||
public enum ReportOutputFormat
|
||
{
|
||
/// <summary>PDF 格式 | PDF format</summary>
|
||
Pdf = 0,
|
||
|
||
/// <summary>Excel(.xlsx)格式 | Excel (.xlsx) format</summary>
|
||
Excel = 1,
|
||
|
||
/// <summary>CSV(逗号分隔值)格式 | CSV (comma-separated values) format</summary>
|
||
Csv = 2,
|
||
|
||
/// <summary>TXT(纯文本)格式 | TXT (plain text) format</summary>
|
||
Txt = 3
|
||
}
|
||
}
|