Files

117 lines
3.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static MP.TaskMan.Objects.Enums;
#nullable disable
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.TaskMan.Models
{
[Table("TaskList")]
public partial class TaskListModel
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int TaskId { get; set; } = 0;
/// <summary>
/// Gruppo task (per gestione precedenze e semaforo exec)
/// </summary>
public int Group { get; set; } = 1;
/// <summary>
/// Ordinale x esecuzione
/// </summary>
public int Ordinal { get; set; } = 0;
/// <summary>
/// Stato Task abilitato / disabilitato
/// </summary>
public bool Enabled { get; set; } = false;
/// <summary>
/// Nome Task
/// </summary>
public string Name { get; set; } = "";
/// <summary>
/// Descrizione Task
/// </summary>
public string Descript { get; set; } = "";
/// <summary>
/// Tipo Task
/// </summary>
public Task2ExeType TType { get; set; } = Task2ExeType.ALL;
/// <summary>
/// Comando da invocare
/// </summary>
public string Command { get; set; } = "";
/// <summary>
/// Elenco argomenti (json)
/// </summary>
public string Args { get; set; } = "";
/// <summary>
/// Frequenza esecuzione da enum
/// </summary>
public TaskFreqType Freq { get; set; } = TaskFreqType.ND;
/// <summary>
/// Cadenza esecuzione
/// </summary>
public int Cad { get; set; } = 1;
/// <summary>
/// DataOra ultima esecuzione
/// </summary>
public DateTime DtLastExec { get; set; } = DateTime.Today.AddYears(-10);
/// <summary>
/// DataOra prossima esecuzione (prevista)
/// </summary>
public DateTime DtNextExec { get; set; } = DateTime.Today.AddYears(-9);
/// <summary>
/// Durata ultima esecuzione in secondi
/// </summary>
public double LastDuration { get; set; } = 0;
/// <summary>
/// Esito ultima esecuzione in Errore
/// </summary>
public bool LastIsError { get; set; } = false;
/// <summary>
/// Ultimo risultato registrato
/// </summary>
public string LastResult { get; set; } = "";
#endregion Public Properties
/// <summary>
/// Equals solo su chiave!
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public override bool Equals(object obj)
{
if (!(obj is TaskListModel item))
return false;
if (TaskId != item.TaskId)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
}