using System;
using System.Collections.Generic;
using System.Text;
namespace Utility
{
public class ScheduleEntity
{
///
/// 任务名称
///
public string JobName { get; set; }
///
/// 任务分组
///
public string JobGroup { get; set; }
///
/// 任务类型
///
public JobTypeEnum JobType { get; set; } = JobTypeEnum.Url;
///
/// 开始时间
///
public DateTimeOffset BeginTime { get; set; } = DateTime.Now;
///
/// 结束时间
///
public DateTimeOffset? EndTime { get; set; }
///
/// Cron表达式
///
public string Cron { get; set; }
///
/// 执行次数(默认无限循环)
///
public int? RunTimes { get; set; }
///
/// 执行间隔时间,单位毫秒(如果有Cron,则IntervalSecond失效)
///
public int? IntervalMilliseconds { get; set; }
///
/// 触发器类型
///
public TriggerTypeEnum TriggerType { get; set; }
///
/// 描述
///
public string Description { get; set; }
#region Url
///
/// 请求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; } = RequestTypeEnum.Post;
#endregion
#region 内置方法
///
/// 类名
///
public string ClassName { get; set; }
///
/// 方法名
///
public string MethodName { get; set; }
///
/// 参数
///
public string MethodParameters { get; set; }
#endregion
}
public class ModifyJobInput
{
public ScheduleEntity NewScheduleEntity { get; set; }
public ScheduleEntity OldScheduleEntity { get; set; }
}
}