TaskTemplateDto.cs
2.63 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
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 int AfterActionType { get; set; }
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 List<ActionDto> Actions { get; set; } = new List<ActionDto>();
}
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; }
}
}