package com.hxhq.business.enums.study;

/**
 * 试验类型1试验，5非试验表单，10麻精药表单
 * @author tanfei
 */
public enum StudyTypeEnum {

    /**
     * 1试验
     */
    sy(1, "试验"),

    /**
     * 5非试验表单
     */
    fsy(5, "非试验表单"),

    /**
     * 10麻精药表单
     */
    mjy(10, "麻精药表单");

    private int value;
    private String text;

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