package com.fdkankan.model.constants;

/**
 * 计算流程枚举
 */
public enum SceneBuildProcessType {

    PRE("pre", "前置处理"),
    CALL("call", "计算"),
    POST("post", "后置处理");

    private String code;
    private String message;

    private SceneBuildProcessType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String code() {
        return code;
    }

    public String message() {
        return message;
    }

    public static SceneBuildProcessType get(String code){
        SceneBuildProcessType[] values = SceneBuildProcessType.values();
        String enumValue = null;
        for(SceneBuildProcessType eachValue : values){
            enumValue = eachValue.code();
            if(enumValue.equals(code)){
                return eachValue;
            }
        }
        return null;
    }

}
