package com.hxhq.business.enums.study;

/**
 * 类型：1：试剂；3：给药制剂；5：麻精药；7：供试品 9：细胞；11：细菌
 * @author tanfei
 */
public enum StudyFormFillResourceTypeEnum {

    /**
     * 试剂
     */
    sj(1, "试剂"),

    /**
     * 给药制剂
     */
    gyzj(3, "给药制剂"),

    /**
     * 麻精药
     */
    mjy(5, "麻精药"),

    /**
     * 供试品
     */
    gsp(7, "供试品"),

    /**
     * 细胞
     */
    Cell(9, "细胞"),

    /**
     * 细菌
     */
    Bacteria(11, "细菌");

    private int value;
    private String text;

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