namespace Hotline.Share.Dtos.FlowEngine.Workflow;

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

    public ReverseFlowStepAssignInfo(EReverseFlowStepCreationPolicy reverseFlowStepCreationPolicy, StepAssignInfo? stepAssignInfo = null)
    {
        ReverseFlowStepCreationPolicy = reverseFlowStepCreationPolicy;
        StepAssignInfo = stepAssignInfo;
    }

    public EReverseFlowStepCreationPolicy ReverseFlowStepCreationPolicy { get; set; } =
        EReverseFlowStepCreationPolicy.OriginStep;

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

/// <summary>
/// 逆向流程，节点创建策略
/// </summary>
public enum EReverseFlowStepCreationPolicy
{
    /// <summary>
    /// 保持原节点的办理对象不变
    /// </summary>
    OriginStep = 1,

    /// <summary>
    /// 指派给原节点办理人
    /// </summary>
    OriginStepUser = 2,

    /// <summary>
    /// 指派给原节点办理部门
    /// </summary>
    OriginStepOrg = 3,

    /// <summary>
    /// 指派给原节点办理角色
    /// </summary>
    OriginStepRole = 4,

    /// <summary>
    /// 指派给原节点办理部门及角色
    /// </summary>
    OriginStepOrgAndRole = 5,

    /// <summary>
    /// 指定办理对象
    /// </summary>
    AssignHandler = 20,

    /// <summary>
    /// 保持原节点配置(指派给角色)
    /// </summary>
    OriginDefinition = 30,
}