You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using System.Text.Json.Serialization;
|
|
|
|
|
|
|
|
namespace CoreAgent.Domain.Models.System;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 命令模板配置
|
|
|
|
/// </summary>
|
|
|
|
public class CommandTemplateConfig
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// 命令类型
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("type")]
|
|
|
|
public NetworkCommandType Type { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 命令模板
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("template")]
|
|
|
|
public string Template { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 超时时间(毫秒)
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("timeout")]
|
|
|
|
public int Timeout { get; set; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否启用
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("isEnabled")]
|
|
|
|
public bool IsEnabled { get; set; } = true;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否需要返回结果
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("needReturnResult")]
|
|
|
|
public bool NeedReturnResult { get; set; } = false;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否需要后台执行
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("needBackgroundExecution")]
|
|
|
|
public bool NeedBackgroundExecution { get; set; } = false;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 命令是否可以被终止
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("canBeKilled")]
|
|
|
|
public bool CanBeKilled { get; set; } = false;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 是否需要带参数
|
|
|
|
/// </summary>
|
|
|
|
[JsonPropertyName("hasParameters")]
|
|
|
|
public bool HasParameters { get; set; } = false;
|
|
|
|
}
|