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

public enum Role {

    SYS_ADMIN("系统管理员", 1), SCHOOL_ADMIN("系统管理员", 2), SCANNER("扫描员", 3), SUBJECT_HEADER("评卷组长", 4), MARKER("评卷员", 5), SCHOOL_VIEWER(
            "成绩查询员", 6), SCHOOL_DEV("学校接口调用", 7), INSPECTOR("复核员", 8), SCAN_ADMIN("扫描管理员", 9), COLLEGE_ADMIN("评卷管理员",
            10);

    private String name;

    private int value;

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

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

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

}
