# LogbookNotifyEnum.java

    package cloud.wconnect.frontoffice.cons.logbook;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    @Getter
    @AllArgsConstructor
    public enum LogbookNotifyEnum {

        OPERATION_CREATED(0, "logbook.notify.create"),

        OPERATION_RESOLVED(1, "logbook.notify.resolve"),

        OPERATION_COMMENT(2, "logbook.notify.comment");

        private final int code;

        private final String i18nCode;

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

    }