package cn.com.qmth.stmms.common.enums;

public enum Status {

    FAILURE("失效", 0), NORMAL("正常", 1);

    private String name;

    private int value;

    private Status(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static Status findByValue(int value) {
        Status status = null;
        for (Status s : Status.values()) {
            if (s.getValue() == value) {
                status = s;
                break;
            }
        }
        return status;
    }
}
