package com.yimeng.okr.enums;

import lombok.Getter;

@Getter
public enum UserRole {
    EMPLOYEE("普通员工"),
    TEAM_LEADER("团队主管"),
    DEPT_LEADER("部门负责人"),
    HR_ADMIN("HR管理员"),
    SUPER_ADMIN("超级管理员");

    private final String label;

    UserRole(String label) {
        this.label = label;
    }

    public static boolean isManagerOrAbove(UserRole role) {
        return role == TEAM_LEADER || role == DEPT_LEADER || role == HR_ADMIN || role == SUPER_ADMIN;
    }

    public static boolean isDeptLeaderOrAbove(UserRole role) {
        return role == DEPT_LEADER || role == HR_ADMIN || role == SUPER_ADMIN;
    }

    public static boolean isHrAdminOrAbove(UserRole role) {
        return role == HR_ADMIN || role == SUPER_ADMIN;
    }
}
