package com.ruoyi.ibs.dashboard.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum LevelEnum {
    HEAD("0", "总行"),
    BRANCH("1", "支行"),
    OUTLET("2", "网点"),
    CUSTOMER_MANAGER("3", "客户经理");

    private String code;
    private String description;

    public static String getDescriptionByCode(String code) {
        for (LevelEnum level : LevelEnum.values()) {
            if (level.getCode().equals(code)) {
                return level.getDescription();
            }
        }
        return code;
    }
}
