43 lines
980 B
C#
43 lines
980 B
C#
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; }
|
||
}
|
||
|