package cn.cecep.talroad.enums;

/**
 * 操作类型
 */
public enum WzzStatusEnum {

    NORMAL(1, "正常"),
    OFFLINE(2, "离线")
    ;

    private int code;

    private String name;

    WzzStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getName(int code) {
        for (WzzStatusEnum delFlagEnum : WzzStatusEnum.values()) {
            if (delFlagEnum.code == code) {
                return delFlagEnum.name;
            }
        }
        return "--";
    }
}
