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

public enum SubjectType {

    BASE("基础科目", 0), COMPOSITE("综合科目", 1);

    private String name;

    private int value;

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

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static SubjectType findByValue(int value) {
        SubjectType type = null;
        for (SubjectType t : SubjectType.values()) {
            if (t.getValue() == value) {
                type = t;
                break;
            }
        }
        return type;
    }
}
