using System;
namespace GB5Shared.DTO.WorkFlow
{
///
/// Maps to MWORKFLOWCONFIG — determines which workflow applies for a given
/// Entity / OU / BizTransactionClass / BizTransaction combination.
///
public class WorkflowConfigDTO
{
/// Primary key of MWORKFLOWCONFIG.
public int WorkflowConfigId { get; set; }
/// -1 = all clients (wildcard).
public int ClientId { get; set; }
/// -1 = all entities (wildcard).
public int EntityId { get; set; }
/// -1 = all organisation units (wildcard).
public int OuId { get; set; }
/// -1 = all biz-transaction classes (wildcard).
public int BizTransactionClassId { get; set; }
///
/// 0 = ignore BizTransactionId, 1 = must also match BizTransactionId.
///
public bool IsBizTransactionWise { get; set; }
/// -1 = all biz transactions (wildcard).
public int BizTransactionId { get; set; }
///
/// 0 = normal workflow execution.
/// 1 = form-based approval (WIP mode — treated as regular since WIP is unsupported).
///
public bool IsFormBasedApproval { get; set; }
/// FK to MWORKFLOW.WORKFLOWID.
public int WorkflowId { get; set; }
///
/// Optional C# boolean expression evaluated against the caller's facts dictionary.
/// Example: TaskDetailType == 0 || TaskDetailType == 1
/// Null / empty = always applicable.
///
public string? EvalCondition { get; set; }
/// Free-text remarks / description.
public string? Remarks { get; set; }
///
/// Full URL of the entity save API to call after final WIP approval.
/// Only applicable when IsFormBasedApproval = true.
/// Example: http://task-service:5000/Task/SaveTask
///
public string? CallbackEndpoint { get; set; }
public DateTime CreatedDate { get; set; }
}
}