package com.hxhq.business.enums.study;

/**
 * 试验状态1草稿，3试验中，5已锁定，7待归档，9归档，10待解档
 * @author tanfei
 */
public enum StudyStatusEnum {

    /**
     * 1草稿
     */
    cg(1, "草稿"),

    /**
     * 1试验中
     */
    syz(3, "试验中"),

    /**
     * 1已锁定
     */
    ysd(5, "已锁定"),

    /**
     * 1待归档
     */
    dgd(7, "待归档"),

    /**
     * 1归档
     */
    gd(9, "归档"),

    /**
     * 10待解档
     */
    djd(10, "待解档");

    private int value;
    private String text;

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