using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace GB5Shared.DTO.WorkFlow { public class WorkflowDTO { public bool IsWorkflowRequired { get; set; } public bool IsWip { get; set; } public List EvalConditions { get; set; } = new(); public List Rules { get; set; } = new(); } public class GetWorkFlowDTO { public int WorkFlowId { get; set; } public string? WorkFlowName { get; set; } public long EntityId { get; set; } public int WorkFlowMode { get; set; } public int Version { get; set; } public int Status { get; set; } public long TenantId { get; set; } public int SourceType { get; set; } public long CreatedById { get; set; } public DateTime CreatedOn { get; set; } public long? ModifiedById { get; set; } public DateTime? ModifiedOn { get; set; } } public class WorkflowConditionGroupDTO { public int WorkFlowId { get; set; } public string WorkFlowName { get; set; } = string.Empty; public int EntityId { get; set; } public int? ConditionGroupId { get; set; } /// /// 0 = Entity Specific /// 1 = General /// public byte? ConditionNature { get; set; } /// /// 0 = AND /// 1 = OR /// 2 = NOT /// public byte? GroupOperator { get; set; } } public class ConditionGroupDTO { public int ConditionGroupId { get; set; } public int WorkFlowId { get; set; } public string Name { get; set; } = string.Empty; /// /// 0 = Entity Specific, 1 = General /// public byte ConditionNature { get; set; } /// /// -1 for General /// public int EntityId { get; set; } /// /// 0 = Expression, 1 = Structured /// public byte ConditionType { get; set; } public string? Expression { get; set; } public int? ParentConditionGroupId { get; set; } /// /// 0 = AND, 1 = OR, 2 = NOT /// public byte? Operator { get; set; } public string? Description { get; set; } public int TenantId { get; set; } = -1; public short SortOrder { get; set; } = 9999; /// /// 0,1,2,3,4,5 /// public byte Status { get; set; } = 1; public short Version { get; set; } = 1; /// /// 1,2,3,4,5 /// public byte SourceType { get; set; } = 5; public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } public class ConditionDTO { public int ConditionId { get; set; } public int ConditionGroupId { get; set; } public int EntityMemberId { get; set; } public string? EntityMemberName { get; set; } /// /// 0 = EQ /// 1 = NE /// 2 = GT /// 3 = LT /// 4 = IN /// 5 = LIKE /// public byte Operator { get; set; } /// /// Condition comparison value /// public string Value { get; set; } = string.Empty; /// /// STRING, INT, DATE, DECIMAL, BOOL etc. /// public string ValueType { get; set; } = string.Empty; public int TenantId { get; set; } = -1; public short SortOrder { get; set; } = 9999; /// /// 0,1,2,3,4,5 /// public byte Status { get; set; } = 1; public short Version { get; set; } = 1; /// /// 1,2,3,4,5 /// public byte SourceType { get; set; } = 5; public int CreatedById { get; set; } public DateTime CreatedOn { get; set; } public int ModifiedById { get; set; } public DateTime ModifiedOn { get; set; } } }