HtmlToPdf/mvp/HtmlToPdfService.Core/Models/ConversionResult.cs
2025-12-11 23:35:52 +08:00

64 lines
1.4 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace HtmlToPdfService.Core.Models;
/// <summary>
/// PDF 转换结果
/// </summary>
public class ConversionResult
{
/// <summary>
/// 请求唯一标识
/// </summary>
public string RequestId { get; set; } = string.Empty;
/// <summary>
/// 是否成功
/// </summary>
public bool Success { get; set; }
/// <summary>
/// PDF 二进制数据
/// </summary>
public byte[]? PdfData { get; set; }
/// <summary>
/// 文件大小(字节)
/// </summary>
public long FileSize { get; set; }
/// <summary>
/// 本地文件路径(如果保存了)
/// </summary>
public string? LocalFilePath { get; set; }
/// <summary>
/// 下载 URL如果保存了
/// </summary>
public string? DownloadUrl { get; set; }
/// <summary>
/// 转换耗时(毫秒)
/// </summary>
public long Duration { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartTime { get; set; }
/// <summary>
/// 完成时间
/// </summary>
public DateTime? CompleteTime { get; set; }
/// <summary>
/// 错误信息(如果失败)
/// </summary>
public string? ErrorMessage { get; set; }
/// <summary>
/// 异常详情(如果失败)
/// </summary>
public string? ExceptionDetails { get; set; }
}