# BlacklistApproveStatusEnum.java

    package cloud.wconnect.frontoffice.cons.badguest;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    /**
     * @author lichen
     * @description 状态枚举类 审批状态 1：pending 待送审 2:approveing 审核中 3: approved 审核结束 4:rejected 审核驳回 5:作废
     * @date 2025/6/04
     */
    @AllArgsConstructor
    @Getter
    public enum BlacklistApproveStatusEnum {
        /**
         * 待送审
         */
        PENDING(1,"pending"),
        /**
         * 审批中
         */
        APPROVEING(2,"approving"),
        /**
         * 审批通过
         */
        APPROVED(3,"approved"),
        /**
         * 审批拒绝
         */
        REJECTED(4,"rejected"),
        /**
         * 作废
         */
        CANCELLATION(5,"blacklist-status-cancellation");

        /**
         * 状态
         */
        private int status;

        /**
         * 国际化code
         */
        private String i18nCode;

        /**
         * 获取国际化code
         *
         * @param status 状态
         * @return java.lang.String
         * @author lichen
         * @date 2025/6/04
         */
        public static String getI18nCode(int status) {
            Optional<BlacklistApproveStatusEnum> optional = Arrays.stream(BlacklistApproveStatusEnum.values())
                    .filter(item -> item.getStatus() == status).findFirst();
            return optional.isPresent() ? optional.get().getI18nCode() : "";
        }
    }