2021-08-23 16:57:25 +08:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
|
|
|
|
|
|
namespace ZR.Model.System
|
|
|
|
|
|
{
|
|
|
|
|
|
///<summary>
|
|
|
|
|
|
///计划任务
|
|
|
|
|
|
///</summary>
|
2022-05-09 12:25:37 +08:00
|
|
|
|
[SugarTable("sys_tasks")]
|
2021-11-27 09:43:04 +08:00
|
|
|
|
[Tenant("0")]
|
2022-10-19 08:20:11 +08:00
|
|
|
|
public class SysTasks
|
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 = "任务名称")]
|
|
|
|
|
|
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 = "任务分组")]
|
|
|
|
|
|
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 = "运行时间表达式")]
|
|
|
|
|
|
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 = "程序集名称")]
|
|
|
|
|
|
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 = "任务所在类")]
|
|
|
|
|
|
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 = "任务描述")]
|
|
|
|
|
|
public string Remark { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 执行次数
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "执行次数")]
|
|
|
|
|
|
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)")]
|
|
|
|
|
|
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 = "执行间隔时间(单位:秒)")]
|
|
|
|
|
|
public int IntervalSecond { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 是否启动
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// 默认 : 0
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
[Display(Name = "是否启动")]
|
|
|
|
|
|
public bool IsStart { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <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; }
|
|
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
|
|
|
|
|
|
[JsonProperty(propertyName: "CreateBy")]
|
|
|
|
|
|
public string Create_by { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-05-04 18:20:18 +08:00
|
|
|
|
/// 创建时间
|
2021-08-23 16:57:25 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
//[Display(Name = "创建时间")]
|
|
|
|
|
|
[SugarColumn(IsOnlyIgnoreUpdate = true)]//设置后修改不会有此字段
|
|
|
|
|
|
[JsonProperty(propertyName: "CreateTime")]
|
|
|
|
|
|
public DateTime Create_time { get; set; } = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
|
[JsonProperty(propertyName: "UpdateBy")]
|
|
|
|
|
|
[SugarColumn(IsOnlyIgnoreInsert = true)]
|
|
|
|
|
|
public string Update_by { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[SugarColumn(IsOnlyIgnoreInsert = true)]//设置后插入数据不会有此字段
|
|
|
|
|
|
[JsonProperty(propertyName: "UpdateTime")]
|
|
|
|
|
|
public DateTime Update_time { get; set; } = DateTime.Now;
|
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>
|
|
|
|
|
|
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>
|
|
|
|
|
|
public string RequestMethod { get; set; }
|
2021-08-23 16:57:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|