package com.hxhq.business.enums;

/**
 * 类型：1：物资；3：一般表单；5：填报表单
 * @author tanfei
 */
public enum SnTypeEnum {

    /**
     * 物资
     */
    wz(1, "物资"),

    /**
     * 一般表单
     */
    ybbd(3, "一般表单"),

    /**
     * 填报表单
     */
    tbbd(5, "填报表单");

    private int value;
    private String text;

    SnTypeEnum(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 SnTypeEnum getEnumByValue(int type) {
        for (SnTypeEnum bt : values()) {
            if (bt.value == type) {
                return bt;
            }
        }
        return null;
    }
}
