TaskTemplateDto.cs
3.88 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
using System.ComponentModel.DataAnnotations;
using Rcs.Application.DTOs;
using Rcs.Domain.Entities;
using Rcs.Domain.Enums;
namespace Rcs.Application.Dtos
{
public class TaskTemplateListItemDto
{
public string TemplateId { get; set; } = string.Empty;
public string TemplateCode { get; set; } = string.Empty;
public string TemplateName { get; set; } = string.Empty;
public string? Description { get; set; }
public int RobotType { get; set; }
public string? Manufacturer { get; set; }
public bool IsEnabled { get; set; }
/// <summary>
/// 是否为默认模板
/// @author zzy
/// </summary>
public bool IsDefault { get; set; }
public DateTime? CreatedAt { get; set; }
}
public class TaskTemplateDto : TaskTemplateListItemDto
{
public List<TaskStepDto> TaskSteps { get; set; } = new List<TaskStepDto>();
}
public class TaskStepDto
{
public string StepId { get; set; } = string.Empty;
public string TemplateId { get; set; } = string.Empty;
public int Type { get; set; }
public string? StepName { get; set; }
public string? Description { get; set; }
public int Order { get; set; }
public DateTime? CreatedAt { get; set; }
public List<StepPropertyDto> Properties { get; set; } = new List<StepPropertyDto>();
}
public class StepPropertyDto
{
public string PropertyId { get; set; } = string.Empty;
public string StepId { get; set; } = string.Empty;
public int PropertyType { get; set; }
public int NodeValue { get; set; }
public List<ActionDto> Actions { get; set; } = new List<ActionDto>();
/// <summary>
/// 前置动作类型1
/// </summary>
public int? PreAction1Type { get; set; }
/// <summary>
/// 前置网络动作集合1
/// </summary>
public List<string>? PreNetActions1 { get; set; }
/// <summary>
/// 后置动作类型1
/// </summary>
public int? PostAction1Type { get; set; }
/// <summary>
/// 后置网络动作集合1
/// </summary>
public List<string>? PostNetActions1 { get; set; }
/// <summary>
/// 前置动作类型2
/// </summary>
public int? PreAction2Type { get; set; }
/// <summary>
/// 前置网络动作集合2
/// </summary>
public List<string>? PreNetActions2 { get; set; }
/// <summary>
/// 后置动作类型2
/// </summary>
public int? PostAction2Type { get; set; }
/// <summary>
/// 后置网络动作集合2
/// </summary>
public List<string>? PostNetActions2 { get; set; }
}
/// <summary>
/// 步骤属性动作配置DTO(后置动作如HTTP请求等)
/// @author zzy
/// </summary>
public class NetActionPropertyDto
{
public string ActionConfigId { get; set; } = string.Empty;
public string? RequestMethod { get; set; }
public string? RequestUrl { get; set; }
public string? RequestParams { get; set; }
public int? RepeatCount { get; set; }
public int? IntervalTimeMs { get; set; }
public string? WaitResponseFlag { get; set; }
public string? ResponseValidationRule { get; set; }
public string? Description { get; set; }
public string? ExtraProperties { get; set; }
}
public class ActionDto
{
public string ActionId { get; set; } = string.Empty;
public string PropertyId { get; set; } = string.Empty;
public string Type { get; set; } = string.Empty;
public string? StepName { get; set; }
public string? Description { get; set; }
public int BlockingType { get; set; } = (int)ActionBlockType.Hard;
public int Order { get; set; }
}
}