diff --git a/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Badge.java b/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Badge.java new file mode 100644 index 000000000..05645153f --- /dev/null +++ b/backend/bang-ggood/src/main/java/com/bang_ggood/category/domain/Badge.java @@ -0,0 +1,31 @@ +package com.bang_ggood.category.domain; + +public enum Badge { + + CLEAN("청결", "청결해요", "✨"), + ROOM_CONDITION("방 컨디션", "방 컨디션이 좋아요", "🏠"), + AMENITY("편의시설", "편의시설이 많아요", "🚇"), + OPTION("옵션", "옵션이 많아요", "🛋️"), + ENVIRONMENT("주거환경", "주거환경이 좋아요", "🌱"), + SECURITY("보안", "안전해요", "🔒"), + ECONOMIC("경제적", "경제적이에요", "💰") + ; + + private final String shortDescription; + private final String longDescription; + private final String emoji; + + Badge(String shortDescription, String longDescription, String emoji) { + this.shortDescription = shortDescription; + this.longDescription = longDescription; + this.emoji = emoji; + } + + public String getShortDescriptionWithEmoji() { + return this.emoji + this.shortDescription; + } + + public String getLongDescriptionWithEmoji() { + return this.emoji + this.longDescription; + } +} 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 14f547670..1778a2d08 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 @@ -4,20 +4,22 @@ public enum Category { - CLEAN(1, "청결"), - ROOM_CONDITION(2, "방 컨디션"), - AMENITY(3, "편의시설"), - OPTION(4, "옵션"), - ENVIRONMENT(5, "주거환경"), - SECURITY(6, "보안"), - ECONOMIC(7, "경제적"); + CLEAN(1, "청결", Badge.CLEAN), + ROOM_CONDITION(2, "방 컨디션", Badge.ROOM_CONDITION), + AMENITY(3, "편의시설", Badge.AMENITY), + OPTION(4, "옵션", Badge.OPTION), + ENVIRONMENT(5, "주거환경", Badge.ENVIRONMENT), + SECURITY(6, "보안", Badge.SECURITY), + ECONOMIC(7, "경제적", Badge.ECONOMIC); private final int id; private final String description; + private final Badge badge; - Category(int id, String description) { + Category(int id, String description, Badge badge) { this.id = id; this.description = description; + this.badge = badge; } public static boolean contains(int id) {