using Admin.NET.Core; using Admin.NET.Core.Service; using Furion.TaskScheduler; using System.ComponentModel.DataAnnotations; namespace Admin.NET.Application { /// /// 任务调度参数 /// public class JobPageInput : PageInputBase { /// /// 任务名称 /// public string JobName { get; set; } /// /// 只执行一次 /// public bool DoOnce { get; set; } = false; /// /// 立即执行(默认等待启动) /// public bool StartNow { get; set; } = false; /// /// 执行类型(并行、列队) /// public SpareTimeExecuteTypes ExecuteType { get; set; } /// /// 执行间隔时间(单位秒) /// /// 5 public int Interval { get; set; } /// /// Cron表达式 /// public string Cron { get; set; } /// /// 定时器类型 /// public SpareTimeTypes TimerType { get; set; } /// /// 请求url /// public string RequestUrl { get; set; } /// /// 请求参数(Post,Put请求用) /// public string RequestParameters { get; set; } /// /// Headers(可以包含如:Authorization授权认证) /// 格式:{"Authorization":"userpassword.."} /// public string Headers { get; set; } /// /// 请求类型 /// public RequestTypeEnum RequestType { get; set; } /// /// 备注 /// public string Remark { get; set; } } /// /// /// public class AddJobInput { /// /// 任务名称 /// public string JobName { get; set; } /// /// 只执行一次 /// public bool DoOnce { get; set; } = false; /// /// 立即执行(默认等待启动) /// public bool StartNow { get; set; } = false; /// /// 执行类型(并行、列队) /// public SpareTimeExecuteTypes ExecuteType { get; set; } /// /// 执行间隔时间(单位秒) /// /// 5 public int? Interval { get; set; } /// /// Cron表达式 /// public string Cron { get; set; } /// /// 定时器类型 /// public SpareTimeTypes TimerType { get; set; } /// /// 请求url /// public string RequestUrl { get; set; } /// /// 请求参数(Post,Put请求用) /// public string RequestParameters { get; set; } /// /// Headers(可以包含如:Authorization授权认证) /// 格式:{"Authorization":"userpassword.."} /// public string Headers { get; set; } /// /// 请求类型 /// public RequestTypeEnum RequestType { get; set; } /// /// 备注 /// public string Remark { get; set; } } /// /// /// public class StopJobInput { /// /// /// public string JobName { get; set; } } /// /// /// public class DeleteJobInput : BaseId { } /// /// /// public class UpdateJobInput : BaseId { /// /// 任务名称 /// /// dilon [Required, MaxLength(20)] public string JobName { get; set; } /// /// 只执行一次 /// public bool DoOnce { get; set; } = false; /// /// 立即执行(默认等待启动) /// public bool StartNow { get; set; } = false; /// /// 执行类型(并行、列队) /// public SpareTimeExecuteTypes ExecuteType { get; set; } = SpareTimeExecuteTypes.Parallel; /// /// 执行间隔时间(单位秒) /// /// 5 public int? Interval { get; set; } = 5; /// /// Cron表达式 /// /// [MaxLength(200)] public string Cron { get; set; } /// /// 定时器类型 /// public SpareTimeTypes TimerType { get; set; } = SpareTimeTypes.Interval; /// /// 请求url /// [MaxLength(200)] public string RequestUrl { get; set; } /// /// 请求参数(Post,Put请求用) /// public string RequestParameters { get; set; } /// /// Headers(可以包含如:Authorization授权认证) /// 格式:{"Authorization":"userpassword.."} /// public string Headers { get; set; } /// /// 请求类型 /// /// 2 public RequestTypeEnum RequestType { get; set; } = RequestTypeEnum.Post; /// /// 备注 /// [MaxLength(100)] public string Remark { get; set; } } /// /// /// public class QueryJobInput : BaseId { } }