package com.ynfy.buss.exam.paper.enmus;


/**
 * 难度级别
 */
public enum LevelType {
    JD(1, "简单"),
    YB(2, "一般"),
    JN(3, "较难");

    private Integer code;

    private String value;

    LevelType(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static LevelType getByCode(Integer code) {
        for (LevelType levelType : values()) {
            if (levelType.getCode().equals(code)) {
                return levelType;
            }
        }
        return null;
    }

}
