package com.ltgk.common.enums;

import com.ltgk.common.utils.enums.CodeDescEnumInterface;
import lombok.Getter;

/**
 * 重点区域 标注类型 枚举类
 *
 * @Author: wan kun
 * @Description: TODO
 * @Date: 2025/1/16 14:05
 * @Version: 1.0
 */
@Getter
public enum DsMainAreaMarkTypeEnums implements CodeDescEnumInterface {
    OUTER_HARBOUR_ANCHORAGE_AREA(0, "外港锚地区域"),
    FISHING_PORT_ENTER_EXPORT_AREA(1, "渔港进出口区域"),
    CHANNEL(2, "航道区域"),
    PORT(3, "停泊区域"),
    FISHING_UNLOAD_AREA(4, "渔获卸货区域"),
    CHECK_AREA(5, "检查区域"),
    ARREST_OF_SHIPS_AREA(6, "扣押船舶停靠区域"),
    EMERGENCY_AREA(7, "应急区域"),
    WAITING_AREA(8, "待泊区")
    ;

    private final Integer code;
    private final String desc;

    DsMainAreaMarkTypeEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static DsMainAreaMarkTypeEnums getAreaMarkType(Integer code) {
        for (DsMainAreaMarkTypeEnums dsMainAreaMarkTypeEnums : values()) {
            if (dsMainAreaMarkTypeEnums.getCode().equals(code)) {
                return dsMainAreaMarkTypeEnums;
            }
        }
        return null;
    }
}
