using System.Text.Json.Serialization;
namespace FoodLabeling.Application.Contracts.Dtos.LabelTemplate;
public class LabelTemplateCreateInputVo
{
///
/// editor JSON 里的 id,对应数据库 fl_label_template.TemplateCode
///
[JsonPropertyName("id")]
public string TemplateCode { get; set; } = string.Empty;
///
/// editor JSON 里的 name,对应数据库 fl_label_template.TemplateName
///
[JsonPropertyName("name")]
public string TemplateName { get; set; } = string.Empty;
[JsonPropertyName("labelType")]
public string? LabelType { get; set; }
[JsonPropertyName("unit")]
public string Unit { get; set; } = "inch";
[JsonPropertyName("width")]
public decimal Width { get; set; }
[JsonPropertyName("height")]
public decimal Height { get; set; }
///
/// editor JSON 里的 appliedLocation(ALL / SPECIFIED)
///
[JsonPropertyName("appliedLocation")]
public string AppliedLocationType { get; set; } = "ALL";
[JsonPropertyName("showRuler")]
public bool ShowRuler { get; set; } = true;
[JsonPropertyName("showGrid")]
public bool ShowGrid { get; set; } = true;
///
/// 预留:前端可能不传;如果不传则默认 true
///
[JsonPropertyName("state")]
public bool State { get; set; } = true;
///
/// elements(前端 editor 的 elements[],会全量重建)
///
[JsonPropertyName("elements")]
public List Elements { get; set; } = new();
///
/// 当 AppliedLocationType=SPECIFIED 时生效
///
[JsonPropertyName("appliedLocationIds")]
public List AppliedLocationIds { get; set; } = new();
///
/// 模板与产品/标签类型绑定默认值
///
[JsonPropertyName("templateProductDefaults")]
public List? TemplateProductDefaults { get; set; }
}