From 0961cf3ebe9e258576fac80d40cab9c16a643cfb Mon Sep 17 00:00:00 2001 From: goder-0 Date: Thu, 8 Aug 2024 16:51:36 +0900 Subject: [PATCH] =?UTF-8?q?[CHORE]=20DTO=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F?= =?UTF-8?q?=20API=20=EC=8A=A4=ED=8E=99=EC=97=90=20mainImageFileName=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 --- .../portfolio/dto/command/UpdatePortfolioCommand.java | 3 ++- .../portfolio/dto/request/UpdatePortfolioRequestDto.java | 5 +++++ .../meeteam/domain/portfolio/portfolio/entity/Portfolio.java | 3 ++- .../portfolio/portfolio/service/PortfolioServiceImpl.java | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/command/UpdatePortfolioCommand.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/command/UpdatePortfolioCommand.java index 50fa6c7d..e00fd854 100644 --- a/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/command/UpdatePortfolioCommand.java +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/command/UpdatePortfolioCommand.java @@ -13,7 +13,8 @@ public record UpdatePortfolioCommand( LocalDate proceedStart, LocalDate proceedEnd, ProceedType proceedType, - List fileOrder + List fileOrder, + String mainImageFileName ) { } diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/request/UpdatePortfolioRequestDto.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/request/UpdatePortfolioRequestDto.java index 649ade25..88d32a7e 100644 --- a/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/request/UpdatePortfolioRequestDto.java +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/request/UpdatePortfolioRequestDto.java @@ -51,6 +51,11 @@ public record UpdatePortfolioRequestDto( @NotNull @Size(max = 10) List skills, + + @Schema(description = "메인이미지 이름", example = "image.png") + @NotNull + String mainImageFileName, + @Schema(description = "링크") @NotNull @Size(max = 10) diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java index 9319e7b6..3a421c2e 100644 --- a/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java @@ -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 fileOrder) { + List fileOrder, String mainImageFileName) { this.title = title; this.description = description; this.content = content; @@ -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) { diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/service/PortfolioServiceImpl.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/service/PortfolioServiceImpl.java index d9fa6315..1f70c23d 100644 --- a/src/main/java/synk/meeteam/domain/portfolio/portfolio/service/PortfolioServiceImpl.java +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/service/PortfolioServiceImpl.java @@ -140,7 +140,8 @@ public Portfolio editPortfolio(Portfolio portfolio, User user, UpdatePortfolioCo command.proceedType(), field, role, - command.fileOrder() + command.fileOrder(), + command.mainImageFileName() ); return portfolio; }