# ChargebackNotifyEnum.java

    package cloud.wconnect.finance.cons.chargeback;

    import cloud.wconnect.commonlib.cons.NotifySubjectI18nCons;
    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    /**
     * @author: yyt
     * 2024-12-4
     */
    @Getter
    @AllArgsConstructor
    public enum ChargebackNotifyEnum {

        MISSING_REPORT_JOURNAL(1, NotifySubjectI18nCons.MISSING_REPORT),

        NOTIFY_OVER_TIME(2,"chargeback.notify.notify-over-time"),

        APPROVAL_NOTIFICATION(3, "chargeback.notify.approval-notification-subject-configuration");

        private final int code;

        private final String i18nCode;

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

    }