From 5f89a6983eca5393865ece88ec939783c3cd6832 Mon Sep 17 00:00:00 2001 From: Go-Jaecheol Date: Fri, 15 Sep 2023 11:30:14 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20CategoryResponse=EC=97=90=20image=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/funeat/product/dto/CategoryResponse.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/com/funeat/product/dto/CategoryResponse.java b/backend/src/main/java/com/funeat/product/dto/CategoryResponse.java index ebf70e602..3ea9e59a5 100644 --- a/backend/src/main/java/com/funeat/product/dto/CategoryResponse.java +++ b/backend/src/main/java/com/funeat/product/dto/CategoryResponse.java @@ -6,14 +6,16 @@ public class CategoryResponse { private final Long id; private final String name; + private final String image; - public CategoryResponse(final Long id, final String name) { + public CategoryResponse(final Long id, final String name, final String image) { this.id = id; this.name = name; + this.image = image; } public static CategoryResponse toResponse(final Category category) { - return new CategoryResponse(category.getId(), category.getName()); + return new CategoryResponse(category.getId(), category.getName(), category.getImage()); } public Long getId() { @@ -23,4 +25,8 @@ public Long getId() { public String getName() { return name; } + + public String getImage() { + return image; + } }