Review namespace Task --> Job + fix JobStep/JobTask
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
// <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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user