package com.qmth.exam.reserve.enums;

public enum Role {

    SYSTEM("系统"),

    ADMIN("学校管理员"),

    TEACHING("教学点管理员"),

    STUDENT("学生");

    private String title;

    Role(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }


    public static Role getByTitle(String title) {
        for (Role r : Role.values()) {
            if (r.getTitle().equals(title)) {
                return r;
            }
        }

        return null;
    }

}
