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

public enum ClassType {
    BASE("不区分", 0), ART("文科", 1), SCIENCE("理科", 2);

    private String name;

    private int value;

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

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

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