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

43 lines
980 B
C#
Raw 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.

using System.ComponentModel.DataAnnotations;
namespace HtmlToPdfService.Api.Models;
/// <summary>
/// URL 转 PDF 请求
/// </summary>
public class ConvertUrlRequest
{
/// <summary>
/// URL 地址
/// </summary>
[Required(ErrorMessage = "URL 不能为空")]
[Url(ErrorMessage = "URL 格式不正确")]
public string Url { get; set; } = string.Empty;
/// <summary>
/// 等待条件load, domcontentloaded, networkidle0, networkidle2
/// </summary>
public string? WaitUntil { get; set; }
/// <summary>
/// 页面加载超时(毫秒)
/// </summary>
public int? Timeout { get; set; }
/// <summary>
/// PDF 选项
/// </summary>
public PdfOptionsDto? Options { get; set; }
/// <summary>
/// 回调配置
/// </summary>
public CallbackOptionsDto? Callback { get; set; }
/// <summary>
/// 是否保存本地副本
/// </summary>
public bool? SaveLocal { get; set; }
}