Skip to content

Commit

Permalink
[CHORE] DTO 변경 및 API 스펙에 mainImageFileName 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Goder-0 committed Aug 8, 2024
1 parent 29b42db commit 0961cf3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ public record UpdatePortfolioCommand(
LocalDate proceedStart,
LocalDate proceedEnd,
ProceedType proceedType,
List<String> fileOrder
List<String> fileOrder,
String mainImageFileName
) {

}
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public record UpdatePortfolioRequestDto(
@NotNull
@Size(max = 10)
List<Long> skills,

@Schema(description = "메인이미지 이름", example = "image.png")
@NotNull
String mainImageFileName,

@Schema(description = "링크")
@NotNull
@Size(max = 10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Portfolio(Long id, String title, String description, String content, Loca

public void updatePortfolio(String title, String description, String content, LocalDate proceedStart,
LocalDate proceedEnd, ProceedType proceedType, Field field, Role role,
List<String> fileOrder) {
List<String> fileOrder, String mainImageFileName) {
this.title = title;
this.description = description;
this.content = content;
Expand All @@ -141,6 +141,7 @@ public void updatePortfolio(String title, String description, String content, Lo
this.field = field;
this.role = role;
this.fileOrder = fileOrder;
this.mainImageFileName = mainImageFileName;
}

public boolean isAllViewAble(Long userId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ public Portfolio editPortfolio(Portfolio portfolio, User user, UpdatePortfolioCo
command.proceedType(),
field,
role,
command.fileOrder()
command.fileOrder(),
command.mainImageFileName()
);
return portfolio;
}
Expand Down

0 comments on commit 0961cf3

Please sign in to comment.