using System.Collections.Generic; using System.Text.Json.Serialization; using FoodLabeling.Application.Contracts.Dtos.LabelTemplate; namespace FoodLabeling.Application.Contracts.Dtos.Label; /// /// 预览输出:与前端 LabelCanvas/LabelPreviewOnly 的 LabelTemplate 结构尽量一致 /// public class LabelTemplatePreviewDto { [JsonPropertyName("id")] public string Id { get; set; } = string.Empty; [JsonPropertyName("name")] public string Name { get; set; } = string.Empty; [JsonPropertyName("labelType")] public string LabelType { get; set; } = string.Empty; [JsonPropertyName("unit")] public string Unit { get; set; } = string.Empty; [JsonPropertyName("width")] public decimal Width { get; set; } [JsonPropertyName("height")] public decimal Height { get; set; } [JsonPropertyName("appliedLocation")] public string AppliedLocation { get; set; } = "ALL"; [JsonPropertyName("showRuler")] public bool ShowRuler { get; set; } [JsonPropertyName("showGrid")] public bool ShowGrid { get; set; } [JsonPropertyName("elements")] public List Elements { get; set; } = new(); }