2024-06-07 11:04:26 +08:00
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
2021-08-23 16:57:25 +08:00
|
|
|
|
|
|
|
|
|
|
namespace ZR.Model.System
|
|
|
|
|
|
{
|
|
|
|
|
|
///<summary>
|
|
|
|
|
|
///计划任务
|
|
|
|
|
|
///</summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarTable("sys_tasks", "计划任务表")]
|
2021-11-27 09:43:04 +08:00
|
|
|
|
[Tenant("0")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
public class SysTasks : SysBase
|
2021-08-23 16:57:25 +08:00
|
|
|
|
{
|
2022-10-19 08:20:11 +08:00
|
|
|
|
public SysTasks()
|
2021-08-23 16:57:25 +08:00
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 任务id
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
2022-10-19 08:20:11 +08:00
|
|
|
|
[Display(Name = "任务id")]
|
|
|
|
|
|
//[JsonConverter(typeof(ValueToStringConverter))]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
[SugarColumn(IsPrimaryKey = true)]
|
|
|
|
|
|
public string ID { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 任务名称
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "任务名称")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 任务分组
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "任务分组")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public string JobGroup { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 运行时间表达式
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "运行时间表达式")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public string Cron { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 程序集名称
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "程序集名称")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public string AssemblyName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 任务所在类
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "任务所在类")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public string ClassName { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 执行次数
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "执行次数")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(DefaultValue = "0", ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public int RunTimes { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 开始时间
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "开始时间")]
|
|
|
|
|
|
public DateTime? BeginTime { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 结束时间
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "结束时间")]
|
|
|
|
|
|
public DateTime? EndTime { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 触发器类型(0、simple 1、cron)
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// 默认 : 1
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "触发器类型(0、simple 1、cron)")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public int TriggerType { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 执行间隔时间(单位:秒)
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// 默认 : 0
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "执行间隔时间(单位:秒)")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2021-08-23 16:57:25 +08:00
|
|
|
|
public int IntervalSecond { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 是否启动
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "是否启动")]
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(DefaultValue = "0", ExtendedAttribute = ProteryConstant.NOTNULL)]
|
2023-05-18 18:08:38 +08:00
|
|
|
|
public int IsStart { get; set; }
|
2021-08-23 16:57:25 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 传入参数
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "传入参数")]
|
|
|
|
|
|
public string JobParams { get; set; }
|
|
|
|
|
|
|
2022-03-17 21:24:40 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 最后运行时间
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public DateTime? LastRunTime { get; set; }
|
2022-04-03 13:00:30 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// api执行地址
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string ApiUrl { get; set; }
|
|
|
|
|
|
/// <summary>
|
2022-12-01 17:01:41 +08:00
|
|
|
|
/// 任务类型 1、程序集 2、网络请求 3、SQL语句
|
2022-04-03 13:00:30 +08:00
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(DefaultValue = "1")]
|
2022-04-03 13:00:30 +08:00
|
|
|
|
public int TaskType { get; set; }
|
2022-12-01 17:01:41 +08:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// SQL语句
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public string SqlText { get; set; }
|
2022-12-05 12:03:28 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 网络请求方式
|
|
|
|
|
|
/// </summary>
|
2023-06-07 22:28:06 +08:00
|
|
|
|
[SugarColumn(Length = 20)]
|
2022-12-05 12:03:28 +08:00
|
|
|
|
public string RequestMethod { get; set; }
|
2021-08-23 16:57:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|