Split the non-essential parts out of the ITask, into ITags and IBudget
This commit is contained in:
parent
52ba6ee606
commit
cbee1422b4
36
e-suite.Workflow.Core/Interfaces/IBudget.cs
Normal file
36
e-suite.Workflow.Core/Interfaces/IBudget.cs
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
using e_suite.Workflow.Core.Enums;
|
||||||
|
|
||||||
|
namespace e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
|
public interface IBudget
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// units of work involved in this item (UoW is a business term in this context)
|
||||||
|
/// </summary>
|
||||||
|
public decimal UnitsOfWork { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Cost of this work item
|
||||||
|
/// </summary>
|
||||||
|
public Cost Cost { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The option to show in budget.
|
||||||
|
/// </summary>
|
||||||
|
public BudgetOption BudgetOption { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Time tracking of this item
|
||||||
|
/// </summary>
|
||||||
|
public bool AllowTimeTracking { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Priority of this item
|
||||||
|
/// </summary>
|
||||||
|
public Priority Priority { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// alloted duration of this item.
|
||||||
|
/// </summary>
|
||||||
|
public TimeSpan Duration { get; set; }
|
||||||
|
}
|
||||||
6
e-suite.Workflow.Core/Interfaces/ITags.cs
Normal file
6
e-suite.Workflow.Core/Interfaces/ITags.cs
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
namespace e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
|
public interface ITags
|
||||||
|
{
|
||||||
|
public IList<string> Tags { get; set; }
|
||||||
|
}
|
||||||
@ -1,6 +1,4 @@
|
|||||||
using e_suite.Workflow.Core.Enums;
|
namespace e_suite.Workflow.Core.Interfaces;
|
||||||
|
|
||||||
namespace e_suite.Workflow.Core.Interfaces;
|
|
||||||
|
|
||||||
public interface ITask
|
public interface ITask
|
||||||
{
|
{
|
||||||
@ -27,39 +25,7 @@ public interface ITask
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
|
/// List of tasks that need to be completed before this on can start. (If empty, will start when the workflow starts)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
IList<ITask> Predecessors { get; }
|
ITask? Predecessor { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// units of work involved in this item (UoW is a business term in this context)
|
|
||||||
/// </summary>
|
|
||||||
public decimal UnitsOfWork { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Cost of this work item
|
|
||||||
/// </summary>
|
|
||||||
public Cost Cost { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The option to show in budget.
|
|
||||||
/// </summary>
|
|
||||||
public BudgetOption BudgetOption { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Time tracking of this item
|
|
||||||
/// </summary>
|
|
||||||
public bool AllowTimeTracking { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Priority of this item
|
|
||||||
/// </summary>
|
|
||||||
public Priority Priority { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// alloted duration of this item.
|
|
||||||
/// </summary>
|
|
||||||
public TimeSpan Duration { get; set; }
|
|
||||||
|
|
||||||
public IList<string> Tags { get; set; }
|
|
||||||
|
|
||||||
//Todo can only be on a run-time instance
|
//Todo can only be on a run-time instance
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
|||||||
@ -3,13 +3,13 @@ using e_suite.Workflow.Core.Interfaces;
|
|||||||
|
|
||||||
namespace e_suite.Workflow.Core;
|
namespace e_suite.Workflow.Core;
|
||||||
|
|
||||||
public abstract class TaskBase : ITask
|
public abstract class TaskBase : ITask, IBudget, ITags
|
||||||
{
|
{
|
||||||
public Guid Guid { get; set; } = Guid.CreateVersion7();
|
public Guid Guid { get; set; } = Guid.CreateVersion7();
|
||||||
public required ITask Parent { get; set; }
|
public required ITask Parent { get; set; }
|
||||||
public required string Name { get; set; }
|
public required string Name { get; set; }
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
public IList<ITask> Predecessors { get; set; } = new List<ITask>();
|
public ITask? Predecessor { get; set; }
|
||||||
public decimal UnitsOfWork { get; set; } = 1;
|
public decimal UnitsOfWork { get; set; } = 1;
|
||||||
public required Cost Cost { get; set; }
|
public required Cost Cost { get; set; }
|
||||||
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
|
public BudgetOption BudgetOption { get; set; } = BudgetOption.DoNotShow;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user