From bd3d8d660539b8d5aa2c0d1b27d7e48c7b80302c Mon Sep 17 00:00:00 2001 From: shin-jisong <86762272+shin-jisong@users.noreply.github.com> Date: Thu, 25 Jul 2024 10:32:51 +0900 Subject: [PATCH] =?UTF-8?q?refactor(Category):=20=EC=A7=88=EB=AC=B8=20?= =?UTF-8?q?=EC=A0=80=EC=9E=A5=ED=95=98=EB=8A=94=20=EC=9E=90=EB=A3=8C?= =?UTF-8?q?=ED=98=95=20Set=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: tkdgur0906 <39580658+tkdgur0906@users.noreply.github.com> --- .../bang_ggood/category/domain/Category.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Category.java b/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Category.java index 4edb649bd..2f66e2259 100644 --- a/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Category.java +++ b/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Category.java @@ -1,23 +1,24 @@ package com.bang_ggood.category.domain; import java.util.Arrays; -import java.util.List; +import java.util.LinkedHashSet; +import java.util.Set; public enum Category { - CLEAN(1, "청결", List.of(1, 2, 3, 4, 5)), - ROOM_CONDITION(2, "방 컨디션", List.of(6, 7, 8, 9, 10, 11)), - AMENITY(3, "편의시설", List.of(12, 13, 14)), - OPTION(4, "옵션", List.of(15, 16)), - ENVIRONMENT(5, "주거환경", List.of(17, 18, 19, 20, 21, 22)), - SECURITY(6, "보안", List.of(22, 23, 24, 25, 26, 27, 28, 29, 30)), - ECONOMIC(7, "경제적", List.of(31, 32)); + CLEAN(1, "청결", new LinkedHashSet<>(Set.of(1, 2, 3, 4, 5))), + ROOM_CONDITION(2, "방 컨디션", new LinkedHashSet<>(Set.of(6, 7, 8, 9, 10, 11))), + AMENITY(3, "편의시설", new LinkedHashSet<>(Set.of(12, 13, 14))), + OPTION(4, "옵션", new LinkedHashSet<>(Set.of(15, 16))), + ENVIRONMENT(5, "주거환경", new LinkedHashSet<>(Set.of(17, 18, 19, 20, 21, 22))), + SECURITY(6, "보안", new LinkedHashSet<>(Set.of(22, 23, 24, 25, 26, 27, 28, 29, 30))), + ECONOMIC(7, "경제적", new LinkedHashSet<>(Set.of(31, 32))); private final int id; private final String description; - private final List questionIds; + private final Set questionIds; - Category(int id, String description, List questionIds) { + Category(int id, String description, Set questionIds) { this.id = id; this.description = description; this.questionIds = questionIds; @@ -36,7 +37,7 @@ public String getDescription() { return description; } - public List getQuestionIds() { + public Set getQuestionIds() { return questionIds; } }