# ScheduleNotifyEnum.java

    package cloud.wconnect.workperformance.cons.schedule;

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

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

    /**
     * @author: yyt
     * 2024-01-24
     */
    @Getter
    @AllArgsConstructor
    public enum ScheduleNotifyEnum {

        EMPLOYEE_REPORT_MISSING(1, NotifySubjectI18nCons.MISSING_REPORT),

        APPLY_DEPARTMENT_PERMISSION(2, NotifySubjectI18nCons.DATA_PERMISSION_APPLY),

        HISTORY_AND_FORECAST_REPORT_MISSING(3, NotifySubjectI18nCons.MISSING_REPORT);

        private final int code;

        private final String i18nCode;

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

    }