-
Notifications
You must be signed in to change notification settings - Fork 0
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
60 additions
and
0 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
46 changes: 46 additions & 0 deletions
46
src/main/java/org/sophy/sophy/controller/dto/response/BooktalkDetailResponseDto.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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.sophy.sophy.controller.dto.response; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import org.sophy.sophy.domain.BookCategory; | ||
import org.sophy.sophy.domain.Booktalk; | ||
import org.sophy.sophy.domain.PreliminaryInfo; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class BooktalkDetailResponseDto { | ||
private String booktalkImageUrl; | ||
private String title; | ||
private String Author; | ||
private BookCategory bookCategory; | ||
private String book; //TODO 추후 연결 | ||
private LocalDateTime startDate; | ||
private LocalDateTime endDate; | ||
private Integer participant; | ||
private Integer participationFee; | ||
private PreliminaryInfo preliminaryInfo; | ||
private String description; | ||
private String PlaceName; | ||
private String PlaceAddress; | ||
|
||
public static BooktalkDetailResponseDto of(Booktalk booktalk) { | ||
return new BooktalkDetailResponseDto( | ||
booktalk.getBooktalkImageUrl(), | ||
booktalk.getTitle(), | ||
booktalk.getMember().getName(), | ||
booktalk.getBookCategory(), | ||
"책이름", //TODO 추후 연결 | ||
booktalk.getStartDate(), | ||
booktalk.getEndDate(), | ||
booktalk.getParticipantList().size(), | ||
booktalk.getParticipationFee(), | ||
booktalk.getPreliminaryInfo(), | ||
booktalk.getDescription(), | ||
booktalk.getPlace().getName(), | ||
booktalk.getPlace().getAddress() | ||
); | ||
} | ||
} |
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