package com.qmth.exam.reserve.enums;

public enum Role {

    SYSTEM("系统"),

    ADMIN("学校管理员"),

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

    STUDENT("学生");

    private String title;

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

    public static String getRoleName(String roleCode) {
        for (Role role : Role.values()) {
            if (role.name().equals(roleCode)) {
                return role.getTitle();
            }
        }

        return null;
    }

    public String getTitle() {
        return title;
    }

}
