67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System.ComponentModel.DataAnnotations;
|
||
using System.Text.Json.Serialization;
|
||
|
||
namespace XPrintServer.Api.Dto
|
||
{
|
||
public class ScaleRequestInfo
|
||
{
|
||
public ScaleRequestInfo() { }
|
||
|
||
//[JsonPropertyName("prompt")]
|
||
//public string Prompt { get; set; } = string.Empty;
|
||
|
||
|
||
[JsonPropertyName("fileNames")]
|
||
public string[] FileNames { get; set; } = Array.Empty<string>();
|
||
|
||
|
||
/// <summary>
|
||
/// 取值范围:(0,1],向上扩展比例,暂定最大扩展单边1倍(可选)
|
||
/// 默认值:0.1
|
||
/// </summary>
|
||
[Range(0f, 1f)]
|
||
[JsonPropertyName("top")]
|
||
public string Top { get; set; } = "0.1";
|
||
|
||
|
||
/// <summary>
|
||
/// 取值范围:(0,1],向下扩展比例,暂定最大扩展单边1倍(可选)
|
||
/// 默认值:0.1
|
||
/// </summary>
|
||
[Range(0f, 1f)]
|
||
[JsonPropertyName("bottom")]
|
||
public string Bottom { get; set; } = "0.1";
|
||
|
||
/// <summary>
|
||
/// 取值范围:(0,1],向左扩展比例,暂定最大扩展单边1倍(可选)
|
||
/// 默认值:0.1
|
||
/// </summary>
|
||
[Range(0f, 1f)]
|
||
[JsonPropertyName("left")]
|
||
public string Left { get; set; } = "0.1";
|
||
|
||
/// <summary>
|
||
/// 取值范围:(0,1],向右扩展比例,暂定最大扩展单边1倍(可选)
|
||
/// 默认值:0.1
|
||
/// </summary>
|
||
[Range(0f, 1f)]
|
||
[JsonPropertyName("right")]
|
||
public string Right { get; set; } = "0.1";
|
||
|
||
/// <summary>
|
||
/// 最大输出高度(可选)
|
||
/// 默认值:1920,在扩图处理后resize到指定尺寸进行兜底
|
||
/// </summary>
|
||
[JsonPropertyName("max_height")]
|
||
public int MaxHeight { get; set; } = 1920;
|
||
|
||
|
||
/// <summary>
|
||
/// 最大输出宽度(可选)
|
||
/// 默认值:1920,在扩图处理后resize到指定尺寸进行兜底
|
||
/// </summary>
|
||
[JsonPropertyName("max_width")]
|
||
public int MaxWidth { get; set; } = 1920;
|
||
}
|
||
}
|