# PastReservationLineNotifyEnum.java

    package cloud.wconnect.frontoffice.cons.pastreservation;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    /**
     * @author: yyt
     * 2024-10-4
     */
    @Getter
    @AllArgsConstructor
    public enum PastReservationLineNotifyEnum {

        CONSECUTIVE_STAY_NOTICE(2,"Long-Term Guest notification");

        private final int code;

        private final String i18nCode;

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

    }