package com.sf.service.gateway.enums;

/**
 * 网关系统数据状态
 * 
 * @author zoukun
 */
public enum GatewayDataStatus
{
    DISABLE("0", "停用"),
    ENABLE("1", "启用")
    ;

    private final String code;
    private final String info;

    GatewayDataStatus(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }

    public static GatewayDataStatus getByCode(String code){
        for (GatewayDataStatus value : GatewayDataStatus.values()) {
            if (value.code.equals(code)){
                return value;
            }
        }
        return null;
    }
}
