package cn.axzo.workflow.common.model.request.bpmn;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class RestBpmnProcessVariable extends BpmnProcessVariable {

    public enum RestVariableScope {
        LOCAL, GLOBAL
    }

    /**
     * 变量作用域， 目前支持 LOCAL（局部变量） 和 GLOBAL（全局变量）
     */
    private RestVariableScope scope = RestVariableScope.GLOBAL;

    public String getVariableScope() {
        String scope = null;
        if (this.scope != null) {
            scope = this.scope.name().toLowerCase();
        }
        return scope;
    }

}
