package cn.com.qmth.stmms.common.enums;

/**
 * 题型
 * 
 */
public enum QuestionType {
    SINGLE("单选", 1), MULTIPLE("多选", 2), TRUE_OR_FALSE("判断", 3);

    private String name;

    private int value;

    private QuestionType(String name, int value) {
        this.name = name;
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static QuestionType findByValue(int value) {
        for (QuestionType c : QuestionType.values()) {
            if (c.getValue() == value) {
                return c;
            }
        }
        return null;
    }
}
