# OOORoomLineNotifyTitleEnum.java

    package cloud.wconnect.frontoffice.cons.oooroom;

    import cloud.wconnect.frontoffice.cons.clc.CLCNotifyEnum;
    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

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

        MISSING_REPORT(1, "Missing report"),

        NO_OOO_ROOM(2, "No OOO Room"),

        HAVE_OOO_ROOM(2, "Have OOO Room");

        private final int code;

        private final String i18nCode;

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

    }