package com.iformall.enums;

/**
 * Created by luozukai
 */
public enum EnumFlowPermissionType {

    // 0无权限 1合同审批 2账单审批
    DEFAULT(0, "无权限"),
    CONTRACT(1, "合同审批权限"),
    BILL(2, "账单审批权限")
    ;

    public static EnumFlowPermissionType getEnum(Integer code) {
        for (EnumFlowPermissionType value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    private Integer code;
    private String message;

    EnumFlowPermissionType(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
