package com.hxhq.business.enums;

/**
 * 状态类型：1禁用，10启用
 * @author tanfei
 */
public enum NormalEnum {

    /**
     * 1禁用
     */
    no(1, "禁用"),

    /**
     * 10启用
     */
    yes(10, "启用");

    private int value;
    private String text;

    NormalEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static NormalEnum getEnumByValue(int type) {
        for (NormalEnum bt : values()) {
            if (bt.value == type) {
                return bt;
            }
        }
        return null;
    }
}
