using SqlSugar; using System; namespace Wood.Entity.SystemManage; /// /// 系统作业触发器表 /// [SugarTable("SysJobTrigger", "系统作业触发器表")] public class JobTriggerEntity : EntityCreateBase { /// /// 触发器Id /// [SugarColumn(ColumnDescription = "触发器Id", Length = 64)] public virtual string TriggerId { get; set; } = ""; /// /// 作业Id /// [SugarColumn(ColumnDescription = "作业Id", Length = 64)] public virtual string JobId { get; set; } = ""; /// /// 触发器类型FullName /// [SugarColumn(ColumnDescription = "触发器类型")] public TriggerTypeEnum TriggerType { get; set; } = TriggerTypeEnum.Cron; /// /// 参数 /// 运行时间间隔 /// [SugarColumn(ColumnDescription = "参数", Length = 128)] public string Args { get; set; } = ""; /// /// 描述信息 /// [SugarColumn(ColumnDescription = "描述信息", Length = 128, IsNullable = true)] public string? Description { get; set; } /// /// 状态 /// [SugarColumn(ColumnDescription = "状态")] public TriggerStatusEnum Status { get; set; } = TriggerStatusEnum.Ready; /// /// 起始时间 /// [SugarColumn(ColumnDescription = "起始时间", IsNullable = true)] public DateTime? StartTime { get; set; } /// /// 结束时间 /// [SugarColumn(ColumnDescription = "结束时间", IsNullable = true)] public DateTime? EndTime { get; set; } /// /// 最近运行时间 /// [SugarColumn(ColumnDescription = "最近运行时间", IsNullable = true)] public DateTime? LastRunTime { get; set; } /// /// 下一次运行时间 /// [SugarColumn(ColumnDescription = "下一次运行时间", IsNullable = true)] public DateTime? NextRunTime { get; set; } /// /// 触发次数 /// [SugarColumn(ColumnDescription = "触发次数")] public long NumberOfRuns { get; set; } = 0; /// /// 最大触发次数(0:不限制,n:N次) /// [SugarColumn(ColumnDescription = "最大触发次数")] public long MaxNumberOfRuns { get; set; } = 0; /// /// 出错次数 /// [SugarColumn(ColumnDescription = "出错次数")] public long NumberOfErrors { get; set; } = 0; /// /// 最大出错次数(0:不限制,n:N次) /// [SugarColumn(ColumnDescription = "最大出错次数")] public long MaxNumberOfErrors { get; set; } = 0; /// /// 重试次数 /// [SugarColumn(ColumnDescription = "重试次数")] public int NumRetries { get; set; } = 0; /// /// 重试间隔时间(ms) /// [SugarColumn(ColumnDescription = "重试间隔时间(ms)")] public int RetryTimeout { get; set; } = 60000; /// /// 是否启动时执行一次 /// [SugarColumn(ColumnDescription = "是否启动时执行一次")] public bool RunOnStart { get; set; } = false; }