package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 检查级别与被检查级别枚举
 */
@Getter
@AllArgsConstructor
public enum CheckLevelEnum {

    STATION_LEVEL("STATION_LEVEL", "站级"),
    BRIGADE_LEVEL("BRIGADE_LEVEL", "大队级"),
    DEPARTMENT_LEVEL("DEPARTMENT_LEVEL", "主管级"),
    TEAM_LEVEL("TEAM_LEVEL", "班组级"),
    PERSONNEL_LEVEL("PERSONNEL_LEVEL", "人员级");

    private final String code;
    private final String desc;

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

}
