NetActionPropertys.cs
2.78 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
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Rcs.Domain.Enums;
namespace Rcs.Domain.Entities;
/// <summary>
/// 步骤属性动作配置实体类(用于存储后置动作如HTTP请求等配置)
/// @author zzy
/// </summary>
[Table("net_action_propertys")]
public class NetActionPropertys
{
/// <summary>
/// 动作配置ID
/// </summary>
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column("net_action_id")]
public Guid NetActionId { get; set; }
/// <summary>
/// 动作名称
/// @author zzy
/// </summary>
[Required]
[Column("action_name")]
[MaxLength(100)]
public string ActionName { get; set; } = string.Empty;
/// <summary>
/// 是否启用
/// @author zzy
/// </summary>
[Column("is_active")]
public bool IsActive { get; set; } = true;
/// <summary>
/// 请求方式(POST、GET等)
/// </summary>
[Column("request_method")]
[MaxLength(10)]
public string? RequestMethod { get; set; }
/// <summary>
/// 请求URL
/// </summary>
[Column("request_url")]
[MaxLength(500)]
public string? RequestUrl { get; set; }
/// <summary>
/// 请求参数(JSON格式)
/// </summary>
[Column("request_params", TypeName = "text")]
public string? RequestParams { get; set; }
/// <summary>
/// 重复次数(-1表示无限重复)
/// </summary>
[Column("repeat_count")]
public int? RepeatCount { get; set; }
/// <summary>
/// 间隔时间(毫秒)
/// </summary>
[Column("interval_time_ms")]
public int? IntervalTimeMs { get; set; }
/// <summary>
/// 等待响应类型(0=无响应, 1=同步响应, 2=异步响应)
/// @author zzy
/// </summary>
[Column("wait_response_type")]
public ResponseWaitType WaitResponseType { get; set; } = ResponseWaitType.None;
/// <summary>
/// 响应验证规则(如:code=200、success=true等)
/// </summary>
[Column("response_validation_rule")]
[MaxLength(200)]
public string? ResponseValidationRule { get; set; }
/// <summary>
/// 描述信息
/// </summary>
[Column("description")]
[MaxLength(500)]
public string? Description { get; set; }
/// <summary>
/// 其他扩展属性(JSON格式存储)
/// </summary>
[Column("extra_properties", TypeName = "text")]
public string? ExtraProperties { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("created_at", TypeName = "timestamp")]
public DateTime? CreatedAt { get; set; }
/// <summary>
/// 更新时间
/// </summary>
[Column("updated_at", TypeName = "timestamp")]
public DateTime? UpdatedAt { get; set; }
}