# GmwrCommentItemEnum.java

    package cloud.wconnect.workperformance.cons.gmwr.comment;

    import lombok.AllArgsConstructor;
    import lombok.Getter;

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

    /**
     * Enum: Comment Item
     *
     * @author zc
     * @date 2025/02/28
     */
    @Getter
    @AllArgsConstructor
    public enum GmwrCommentItemEnum {

        REVENUE(1, "Revenue"),
        EXPENSE(2, "Expense"),
        OPEN_POSITION(3, "Open Position"),
        TRAINING(4, "Training"),
        EMPLOYEE_FEEDBACK(5, "Employee Feedback"),
        GUEST_SERVICE(6, "Guest Service"),
        QUALITY(7, "Quality"),
        OOO_ROOMS(8, "OOO Rooms"),
        CAPITOL_PROJECT(9, "Capitol Project"),
        IT(10, "IT");

        private final int category;

        private final String categoryName;

        /**
         * 获取分类名称
         *
         * @param category 分类
         * @return java.lang.String
         * @author zc
         * @date 2025/2/28
         */
        public static String getCategoryName(int category) {
            Optional<GmwrCommentItemEnum> optional = Arrays.stream(GmwrCommentItemEnum.values())
                    .filter(item -> item.getCategory() == category).findFirst();
            return optional.isPresent() ? optional.get().getCategoryName() : "";
        }

    }