Skip to content

Commit

Permalink
feat: CategoryResponse에 image 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Go-Jaecheol committed Sep 15, 2023
1 parent 8899409 commit 5f89a69
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -23,4 +25,8 @@ public Long getId() {
public String getName() {
return name;
}

public String getImage() {
return image;
}
}

0 comments on commit 5f89a69

Please sign in to comment.