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

public enum UserType {
    ADMIN("管理员", 0), MARKER("评卷员", 1), SUBJECTHEADER("科组长", 2), TEACHER("老师", 3), STUDENT("学生", 4), VIEWER("科目查询员", 5), SCHOOLVIEWER("科目查询员", 6);

    private String name;

    private int value;

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

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

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