package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 配分层级枚举
 */
@Getter
@AllArgsConstructor
public enum ScoreLevelEnum {

    DEPT("1", "部门"),
    TEAM("2", "队室/班组"),
    GROUP("3", "通道/小组"),
    PERSON("4", "员工");

    private final String code;
    private final String desc;

    public static ScoreLevelEnum getByCode(String code) {
        for (ScoreLevelEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

}
