# CLCLineNotifyTitleEnum.java

    package cloud.wconnect.frontoffice.cons.clc;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

    import java.util.Arrays;
    import java.util.Optional;

    /**
     * @author: yyt
     * 2024-01-23
     */
    @Getter
    @AllArgsConstructor
    public enum CLCLineNotifyTitleEnum {

        MISSING_REPORT_ARRIVAL(1,"Missing arrival report"),

        MISSING_CLC(2,"Unmatched"),

        NO_CLICK_CHECK_OUT(3,"Customer check out"),

        MISSING_REPORT_GUEST_IN_HOUSE(4,"Missing guest in house report");

        private final int code;

        private final String i18nCode;

        public static String getI18nCode(int code) {
            Optional<CLCLineNotifyTitleEnum> optional = Arrays.stream(CLCLineNotifyTitleEnum.values())
                    .filter(item -> item.getCode() == code).findFirst();
            return optional.isPresent() ? optional.get().getI18nCode() : "";
        }

    }