using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
#nullable disable
namespace Ropin.Inspection.Model.Entities
{
///
/// 任务计划表
///
public class TasksQz : BaseViewModel
{
[Required, MaxLength(50)]
public string C_StoreCode { get; set; }
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
///
/// 任务名称
///
[MaxLength(200)]
public string Name { get; set; }
///
/// 任务分组
///
[MaxLength(200)]
public string JobGroup { get; set; }
///
/// 任务运行时间表达式
///
[MaxLength(200)]
public string Cron { get; set; }
///
/// 任务所在DLL对应的程序集名称
///
[MaxLength(200)]
public string AssemblyName { get; set; }
///
/// 任务所在类
///
[MaxLength(200)]
public string ClassName { get; set; }
///
/// 任务描述
///
[MaxLength(1000)]
public string Remark { get; set; }
///
/// 执行次数
///
[Required]
public int RunTimes { get; set; }
///
/// 开始时间
///
[Required]
public DateTime? BeginTime { get; set; }
///
/// 结束时间
///
[Required]
public DateTime? EndTime { get; set; }
///
/// 触发器类型(0、simple 1、cron)
///
[Required]
public int TriggerType { get; set; }
///
/// 执行间隔时间, 秒为单位
///
public int IntervalSecond { get; set; }
///
/// 循环执行次数
///
public int CycleRunTimes { get; set; }
///
/// 是否启动
///
public bool IsStart { get; set; } = false;
///
/// 执行传参
///
public string JobParams { get; set; }
public bool? IsDeleted { get; set; }
///
/// 创建时间
///
public DateTime CreateTime { get; set; } = DateTime.Now;
///
/// 创建者
///
public Guid CreateBy { get; set; }
///
/// 任务内存中的状态
///
public List Triggers { get; set; }
public virtual ICollection TaskInfoDtos { get; set; }
//[ForeignKey("C_LicenseCode")]
//public virtual TSYS_License LicenseCode { get; set; }
}
//public partial class TasksQz
//{
// public TasksQz()
// {
// TaskInfoDtos = new HashSet();
// }
// public Guid Id { get; set; }
// public string C_LicenseCode { get; set; }
// public string Name { get; set; }
// public string JobGroup { get; set; }
// public string Cron { get; set; }
// public string AssemblyName { get; set; }
// public string ClassName { get; set; }
// public string Remark { get; set; }
// public int RunTimes { get; set; }
// public DateTime BeginTime { get; set; }
// public DateTime EndTime { get; set; }
// public int TriggerType { get; set; }
// public int IntervalSecond { get; set; }
// public int CycleRunTimes { get; set; }
// public bool IsStart { get; set; }
// public string JobParams { get; set; }
// public bool? IsDeleted { get; set; }
// public DateTime CreateTime { get; set; }
// public Guid CreateBy { get; set; }
// public virtual ICollection TaskInfoDtos { get; set; }
//}
}