-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
api/src/main/java/com/sponus/sponusbe/domain/portfolio/dto/PortfolioGetResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,27 @@ | ||
package com.sponus.sponusbe.domain.portfolio.dto; | ||
|
||
import java.time.LocalDate; | ||
import java.util.List; | ||
|
||
import com.sponus.coredomain.domain.portfolio.Portfolio; | ||
|
||
public record PortfolioGetResponse( | ||
Long portfolioId, | ||
Long clubId, | ||
LocalDate startDate, | ||
LocalDate endDate, | ||
String description, | ||
List<PortfolioImageGetResponse> portfolioImageGetResponses | ||
) { | ||
public static PortfolioGetResponse toDto(Portfolio portfolio, | ||
List<PortfolioImageGetResponse> portfolioImageGetResponses) { | ||
return new PortfolioGetResponse( | ||
portfolio.getId(), | ||
portfolio.getClub().getId(), | ||
portfolio.getStartDate(), | ||
portfolio.getEndDate(), | ||
portfolio.getDescription(), | ||
portfolioImageGetResponses | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters