LabelTemplateGetOutputDto.cs 2.54 KB
namespace FoodLabeling.Application.Contracts.Dtos.LabelTemplate;

using System.Text.Json.Serialization;

public class LabelTemplateGetOutputDto
{
    public string Id { get; set; } = string.Empty;

    public string TemplateCode { get; set; } = string.Empty;

    public string TemplateName { get; set; } = string.Empty;

    public string? LabelType { get; set; }

    public string Unit { get; set; } = string.Empty;

    public decimal Width { get; set; }

    public decimal Height { get; set; }

    public string AppliedLocationType { get; set; } = "ALL";

    /// <summary>适用 Company:ALL / SPECIFIED</summary>
    public string AppliedPartnerType { get; set; } = "ALL";

    /// <summary>适用 Region:ALL / SPECIFIED</summary>
    public string AppliedRegionType { get; set; } = "ALL";

    public bool ShowRuler { get; set; }

    public bool ShowGrid { get; set; }

    /// <summary>整标签外框:none / line / dotted(JSON 字段 border)</summary>
    [JsonPropertyName("border")]
    public string BorderType { get; set; } = "none";

    public int VersionNo { get; set; }

    public bool State { get; set; }

    public List<LabelTemplateElementDto> Elements { get; set; } = new();

    public List<string> AppliedLocationIds { get; set; } = new();

    /// <summary>适用 Region 展示(ALL 时为 All Regions;SPECIFIED 时为绑定门店去重后的 Region 名称)</summary>
    public string Region { get; set; } = string.Empty;

    /// <summary>适用门店展示(ALL 时为 All Locations;SPECIFIED 时为门店名称拼接)</summary>
    public string Location { get; set; } = string.Empty;

    /// <summary>适用 Region Id 列表(多选;ALL 时为空数组)</summary>
    public List<string> RegionIds { get; set; } = new();

    /// <summary>与 <see cref="RegionIds"/> 相同(兼容字段)</summary>
    public List<string> GroupIds { get; set; } = new();

    /// <summary>适用门店 Id 列表(多选;ALL 时为空数组)</summary>
    public List<string> LocationIds { get; set; } = new();

    public List<LabelTemplateProductDefaultDto> TemplateProductDefaults { get; set; } = new();

    /// <summary>适用 Company 展示(ALL 时为 All Companies)</summary>
    public string Company { get; set; } = string.Empty;

    /// <summary>适用 Company Id 列表(<c>fl_partner.Id</c>;ALL 时为空数组)</summary>
    public List<string> PartnerIds { get; set; } = new();

    /// <summary>与 <see cref="PartnerIds"/> 相同(兼容字段)</summary>
    public List<string> CompanyIds { get; set; } = new();
}