LabelTemplateElementDto.cs
1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System.Text.Json.Serialization;
namespace FoodLabeling.Application.Contracts.Dtos.LabelTemplate;
/// <summary>
/// 模板元素(对齐 editor JSON:id/type/typeAdd/elementName/x/y/width/height/rotation/border/config 等)
/// </summary>
public class LabelTemplateElementDto
{
[JsonPropertyName("id")]
public string Id { get; set; } = string.Empty;
[JsonPropertyName("type")]
public string ElementType { get; set; } = string.Empty;
/// <summary>
/// 元素附加类型(分组前缀 + 控件名),如 label_Duration
/// </summary>
[JsonPropertyName("typeAdd")]
public string? TypeAdd { get; set; }
[JsonPropertyName("elementName")]
public string ElementName { get; set; } = string.Empty;
[JsonPropertyName("x")]
public decimal PosX { get; set; }
[JsonPropertyName("y")]
public decimal PosY { get; set; }
[JsonPropertyName("width")]
public decimal Width { get; set; }
[JsonPropertyName("height")]
public decimal Height { get; set; }
[JsonPropertyName("rotation")]
public string Rotation { get; set; } = "horizontal";
[JsonPropertyName("border")]
public string BorderType { get; set; } = "none";
[JsonPropertyName("zIndex")]
public int ZIndex { get; set; }
[JsonPropertyName("orderNum")]
public int OrderNum { get; set; }
/// <summary>
/// 值来源:FIXED / AUTO_DB / PRINT_INPUT
/// </summary>
[JsonPropertyName("valueSourceType")]
public string ValueSourceType { get; set; } = "FIXED";
[JsonPropertyName("bindingExpr")]
public string? BindingExpr { get; set; }
[JsonPropertyName("autoQueryKey")]
public string? AutoQueryKey { get; set; }
[JsonPropertyName("inputKey")]
public string? InputKey { get; set; }
[JsonPropertyName("isRequiredInput")]
public bool IsRequiredInput { get; set; }
/// <summary>
/// 元素配置
/// </summary>
[JsonPropertyName("config")]
public object? ConfigJson { get; set; }
}