package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 位置类型枚举类
 *
 * @Author: wangchong
 * @Date: 2025/7/14 14:44
 **/
@Getter
@AllArgsConstructor
public enum BasePositionEnum {

    CHANNEL("CHANNEL", "通道", 3),
    REGIONAL("REGIONAL", "区域", 2),
    TERMINAL("TERMINL", "航站楼", 1),
    ;

    private final String code;
    private final String description;
    private final int level;

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