package com.ltgk.common.enums;

/**
 * @Author: w1826
 * @Description: TODO
 * @Date: 2025/1/6 17:12
 * @Version: 1.0
 */
public enum EnterOutPortType {
    ENTER_PORT(0, "进港"),
    OUT_PORT(1, "出港");
    private Integer code;
    private String type;

    EnterOutPortType(Integer code, String type) {
        this.code = code;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public Integer getCode() {
        return code;
    }

    public static EnterOutPortType getEnterOutPortType(Integer code) {
        for (EnterOutPortType enterOutPortType : EnterOutPortType.values()) {
            if (enterOutPortType.getCode().equals(code)) {
                return enterOutPortType;
            }
        }
        return null;
    }

}
