Files
lux/EgwCoreLib.Lux.Data/DbModel/Job/JobTaskModel.cs
T
2026-03-25 07:24:21 +01:00

85 lines
2.2 KiB
C#

// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace EgwCoreLib.Lux.Data.DbModel.Job
{
/// <summary>
/// Definizione macro dei Cicli di Lavoro / Job
/// </summary>
[Table("task_job")]
public class JobTaskModel
{
/// <summary>
/// ID del record
/// </summary>
[Key]
public int JobID { get; set; }
/// <summary>
/// Descrizione del ciclo di lavoro
/// </summary>
public string Description { get; set; } = "";
/// <summary>
/// Indice (ordinale) visualizzazione
/// </summary>
public int Index { get; set; } = 0;
/// <summary>
/// Indica protezione cancellazione
/// </summary>
public bool Lock { get; set; } = false;
/// <summary>
/// Abilitato o meno x selezione
/// </summary>
public bool Enabled { get; set; } = true;
/// <summary>
/// Many-to-many with Tags
/// </summary>
public virtual ICollection<JobTaskTagModel> TagNav { get; set; } = new List<JobTaskTagModel>();
/// <summary>
/// Navigation verso JobStep
/// </summary>
public virtual ICollection<JobStepModel> JobStepNav { get; set; } = new List<JobStepModel>();
/// <summary>
/// Numero Step compresi
/// </summary>
[NotMapped]
public int NumChild
{
get => JobStepNav?.Count ?? 0;
}
/// <summary>
/// Numero Tags compresi
/// </summary>
[NotMapped]
public int NumTags
{
get => TagNav?.Count ?? 0;
}
/// <summary>
/// Elenco Tags come List<string>
/// </summary>
[NotMapped]
public List<string> TagList
{
get => TagNav.Select(x => x.CodTag).ToList() ?? new List<string>();
}
/// <summary>
/// Elenco ResourcesId come List<int>
/// </summary>
[NotMapped]
public List<int> ResourcesList
{
get => JobStepNav.Select(x => x.ResourceID).ToList() ?? new List<int>();
}
}
}