package com.ema.common.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 通用角色枚举
 *
 * @author LIJIAN
 */
@Getter
@AllArgsConstructor
public enum RoleEnum {
    ADMIN("admin", "管理员"),
    ;

    private String value;
    private String describe;

    public static String getDescribe(String value) {
        for (RoleEnum p : RoleEnum.values()) {
            if (p.getValue().equals(value)) {
                return p.describe;
            }
        }
        return null;
    }
}