namespace Hotline.Share.Dtos.FlowEngine.Workflow;

/// <summary>
/// 正向流程，节点指派方式
/// </summary>
public class ForwardFlowStepAssignInfo
{
    public ForwardFlowStepAssignInfo()
    {
        
    }

    public ForwardFlowStepAssignInfo(EForwardFlowStepCreationPolicy forwardFlowStepCreationPolicy, StepAssignInfo? stepAssignInfo = null)
    {
        ForwardFlowStepCreationPolicy = forwardFlowStepCreationPolicy;
        StepAssignInfo = stepAssignInfo;
    }
    
    public static ForwardFlowStepAssignInfo Default = new ForwardFlowStepAssignInfo();

    public EForwardFlowStepCreationPolicy ForwardFlowStepCreationPolicy { get; set; } =
        EForwardFlowStepCreationPolicy.Definition;
    
    /// <summary>
    /// 节点指定办理对象(非指定办理对象时无效)
    /// </summary>
    public StepAssignInfo? StepAssignInfo { get; set; }
}

public enum EForwardFlowStepCreationPolicy
{
    /// <summary>
    /// 按配置指派
    /// </summary>
    Definition = 0,
    
    /// <summary>
    /// 指定办理对象
    /// </summary>
    AssignHandler = 10,
}