Skip to content

Commit

Permalink
feat: 브랜드 id 필드 같이 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviarla committed Dec 14, 2023
1 parent 8abb26d commit 0da4bf7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
import lombok.Builder;

@Builder
public record BrandResponse(String name, String story, String thumbnail) {
public record BrandResponse(Long id, String name, String story, String thumbnail) {

public static BrandResponse of(BrandResult brandResult) {
return BrandResponse.builder()
.id(brandResult.id())
.name(brandResult.name())
.story(brandResult.story())
.thumbnail(brandResult.thumbnail())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import io.perfume.api.brand.domain.Brand;
import io.perfume.api.file.domain.File;

public record BrandResult(String name, String story, String thumbnail) {
public record BrandResult(Long id, String name, String story, String thumbnail) {
public static BrandResult of(Brand brand, File file) {
return new BrandResult(brand.getName(), brand.getStory(), file.getUrl());
return new BrandResult(brand.getId(), brand.getName(), brand.getStory(), file.getUrl());
}
}

0 comments on commit 0da4bf7

Please sign in to comment.