package cn.stylefeng.workflow.api.pojo.config.node.subflow;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.annotation.SimpleFieldFormat;
import cn.stylefeng.workflow.api.format.DefinitionFormatProcess;
import lombok.Data;

@Data
public class NodeSubFlow {

    @ChineseDescription("子流程的流程定义id")
    @SimpleFieldFormat(processClass = DefinitionFormatProcess.class)
    private Long subDefinitionId;

    @ChineseDescription("是否开启部门会签：true-开启，false-不开启")
    private Boolean deptCounterSignFlag;

    @ChineseDescription("部门会签选择方式：1-来自表单元素，2-来自流程变量")
    private Integer deptCounterSignType;

    @ChineseDescription("部门会签-来自表单元素-表单定义的选择")
    private Long deptCounterSignFormDefinitionId;

    @ChineseDescription("部门会签-来自表单元素-表单字段编码")
    private String deptCounterSignFormVariableCode;

    @ChineseDescription("部门会签-来自流程变量-流程变量的编码")
    private String deptCounterSignModelVariableCode;

    @ChineseDescription("发起人选择方式：1-主流程发起人，2-指定成员，3-来自表单字段，4-来自流程变量")
    private Integer submitterType;

    @ChineseDescription("发起人-指定成员-成员id")
    private Long submitterUserId;

    @ChineseDescription("发起人-指定成员-成员名称")
    private String submitterUserName;

    @ChineseDescription("发起人-来自表单字段-表单定义的选择")
    private Long submitterFormDefinitionId;

    @ChineseDescription("发起人-来自表单字段-表单字段编码")
    private String submitterFormVariableCode;

    @ChineseDescription("发起人-来自流程变量-流程变量的编码")
    private String submitterModelVariableCode;

    @ChineseDescription("父级流程变量是否传递到子流程")
    private Boolean paramSendSubFlag;

    @ChineseDescription("子流程变量是否传递到父级流程")
    private Boolean paramSendParentFlag;

    @ChineseDescription("子流程节点离开规则：1-等待子流程执行完毕，进入下一个节点，2-无需等待子流程完毕，直接进入下一节点")
    private Integer leaveType;

    @ChineseDescription("循环模式：1-指定次数，2-无限次数循环")
    private Integer cycleType;

    @ChineseDescription("循环次数，如果循环模式是1，则此字段必填")
    private Integer cycleNumber;

}
