-
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
1 parent
f7c0838
commit eb21e5e
Showing
8 changed files
with
177 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
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
13 changes: 13 additions & 0 deletions
13
src/main/java/com/odiga/fiesta/festival/dto/projection/FestivalWithSido.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,13 @@ | ||
package com.odiga.fiesta.festival.dto.projection; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
@SuperBuilder | ||
@Getter | ||
@NoArgsConstructor | ||
public class FestivalWithSido extends FestivalData { | ||
|
||
private String sido; | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/com/odiga/fiesta/festival/dto/response/FestivalThisWeekResponse.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,41 @@ | ||
package com.odiga.fiesta.festival.dto.response; | ||
|
||
import java.time.LocalDate; | ||
|
||
import com.odiga.fiesta.festival.dto.projection.FestivalWithSido; | ||
|
||
import lombok.Builder; | ||
|
||
public class FestivalThisWeekResponse extends FestivalBasicResponse { | ||
|
||
private String sido; | ||
private String sigungu; | ||
private String thumbnailImage; | ||
private LocalDate startDate; | ||
private LocalDate endDate; | ||
|
||
@Builder | ||
public FestivalThisWeekResponse(Long festivalId, String name, String sido, | ||
String sigungu, String thumbnailImage, LocalDate startDate, LocalDate endDate) { | ||
super(festivalId, name); | ||
this.sido = sido; | ||
this.sigungu = sigungu; | ||
this.thumbnailImage = thumbnailImage; | ||
this.startDate = startDate; | ||
this.endDate = endDate; | ||
} | ||
|
||
public static FestivalThisWeekResponse of(FestivalWithSido festival, String thumbnailImageUrl) { | ||
return FestivalThisWeekResponse.builder() | ||
.festivalId(festival.getFestivalId()) | ||
.name(festival.getName()) | ||
.sido(festival.getSido()) | ||
.sigungu(festival.getSigungu()) | ||
.thumbnailImage(thumbnailImageUrl) | ||
.startDate(festival.getStartDate()) | ||
.endDate(festival.getEndDate()) | ||
.build(); | ||
|
||
} | ||
|
||
} |
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
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