using System.Text.Json.Serialization; namespace Oms.Application.Labeling.Hiprint; /// /// vg-print / hiprint 导出的模板根节点(只映射渲染所需字段)。 /// public sealed class HiprintTemplateDocument { [JsonPropertyName("panels")] public List Panels { get; set; } = []; } public sealed class HiprintPanel { [JsonPropertyName("index")] public int Index { get; set; } /// 纸宽,单位 mm。 [JsonPropertyName("width")] public float Width { get; set; } = 100f; /// 纸高,单位 mm。 [JsonPropertyName("height")] public float Height { get; set; } = 150f; [JsonPropertyName("printElements")] public List PrintElements { get; set; } = []; } public sealed class HiprintPrintElement { [JsonPropertyName("options")] public HiprintElementOptions Options { get; set; } = new(); [JsonPropertyName("printElementType")] public HiprintElementType? PrintElementType { get; set; } } public sealed class HiprintElementType { [JsonPropertyName("type")] public string? Type { get; set; } [JsonPropertyName("title")] public string? Title { get; set; } } public sealed class HiprintElementOptions { [JsonPropertyName("left")] public float Left { get; set; } [JsonPropertyName("top")] public float Top { get; set; } [JsonPropertyName("width")] public float Width { get; set; } [JsonPropertyName("height")] public float Height { get; set; } [JsonPropertyName("title")] public string? Title { get; set; } [JsonPropertyName("field")] public string? Field { get; set; } [JsonPropertyName("fontSize")] public float? FontSize { get; set; } [JsonPropertyName("fontWeight")] public string? FontWeight { get; set; } [JsonPropertyName("fontFamily")] public string? FontFamily { get; set; } [JsonPropertyName("color")] public string? Color { get; set; } [JsonPropertyName("textAlign")] public string? TextAlign { get; set; } [JsonPropertyName("textType")] public string? TextType { get; set; } [JsonPropertyName("hideTitle")] public bool? HideTitle { get; set; } [JsonPropertyName("src")] public string? Src { get; set; } [JsonPropertyName("borderWidth")] public float? BorderWidth { get; set; } }