-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoutingTask.cs
More file actions
36 lines (30 loc) · 1.23 KB
/
Copy pathRoutingTask.cs
File metadata and controls
36 lines (30 loc) · 1.23 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
using System.Text.Json.Serialization;
namespace ModerBox.CableRouting;
/// <summary>
/// 单个绘制任务(一张图 = 一个起点 + 一个终点 + 一个输出路径)
/// </summary>
public class RoutingTask
{
/// <summary>输出图片路径</summary>
[JsonPropertyName("outputPath")]
public string OutputPath { get; set; } = "result.png";
/// <summary>起点ID(对应 Points 中的某个点)</summary>
[JsonPropertyName("startId")]
public string StartId { get; set; } = string.Empty;
/// <summary>终点ID(对应 Points 中的某个点)</summary>
[JsonPropertyName("endId")]
public string EndId { get; set; } = string.Empty;
/// <summary>
/// 使用的穿管配对名(对应 Pass 点的 pair 字段)。
/// null 表示使用所有穿管点;空字符串 "" 表示不使用穿管。
/// </summary>
[JsonPropertyName("passPair")]
public string? PassPair { get; set; }
/// <summary>
/// 有序穿管配对名列表(新格式,优先于 PassPair)。
/// 电缆路线按列表顺序依次穿管。
/// 当此属性非 null 时,PassPair 被忽略。
/// </summary>
[JsonPropertyName("passPairs")]
public List<string>? PassPairs { get; set; }
}