-
Notifications
You must be signed in to change notification settings - Fork 1
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
862cf19
commit bac8baa
Showing
31 changed files
with
588 additions
and
30 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
27 changes: 27 additions & 0 deletions
27
...va/com/example/artist/service/dto/response/ArtistKoreanNameWithShowIdServiceResponse.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,27 @@ | ||
package com.example.artist.service.dto.response; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.dto.artist.response.ArtistKoreanNamesWithShowIdDomainResponse; | ||
|
||
@Builder | ||
public record ArtistKoreanNameWithShowIdServiceResponse( | ||
UUID showId, | ||
List<ArtistKoreanNameServiceResponse> koreanNameServiceResponses | ||
) { | ||
|
||
public static ArtistKoreanNameWithShowIdServiceResponse from( | ||
ArtistKoreanNamesWithShowIdDomainResponse domainResponse | ||
) { | ||
var koreanNames = domainResponse.koreanNameDomainResponses() | ||
.stream() | ||
.map(ArtistKoreanNameServiceResponse::new) | ||
.toList(); | ||
|
||
return ArtistKoreanNameWithShowIdServiceResponse.builder() | ||
.showId(domainResponse.showId()) | ||
.koreanNameServiceResponses(koreanNames) | ||
.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
23 changes: 23 additions & 0 deletions
23
.../main/java/com/example/genre/service/dto/response/GenreNameWithShowIdServiceResponse.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,23 @@ | ||
package com.example.genre.service.dto.response; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
import org.example.dto.genre.response.GenreNamesWithShowIdDomainResponse; | ||
|
||
public record GenreNameWithShowIdServiceResponse( | ||
UUID showId, | ||
List<GenreNameServiceResponse> genreNames | ||
) { | ||
|
||
public GenreNameWithShowIdServiceResponse( | ||
GenreNamesWithShowIdDomainResponse response | ||
) { | ||
this( | ||
response.showId(), | ||
response.genreNames().stream() | ||
.map(GenreNameServiceResponse::new) | ||
.toList() | ||
); | ||
} | ||
|
||
} |
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
50 changes: 50 additions & 0 deletions
50
.../java/com/example/show/controller/dto/response/ShowWithTicketingTimesServiceResponse.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,50 @@ | ||
package com.example.show.controller.dto.response; | ||
|
||
import com.example.show.service.dto.response.ShowSeatServiceResponse; | ||
import com.example.show.service.dto.response.ShowTicketingSiteServiceResponse; | ||
import com.example.show.service.dto.response.ShowTicketingTimeServiceResponse; | ||
import java.time.LocalDate; | ||
import java.util.List; | ||
import java.util.UUID; | ||
import org.example.dto.show.response.ShowTicketingTimeDomainResponse; | ||
import org.example.dto.show.response.ShowWithTicketingTimesDomainResponse; | ||
|
||
public record ShowWithTicketingTimesServiceResponse( | ||
UUID id, | ||
String title, | ||
String content, | ||
LocalDate startDate, | ||
LocalDate endDate, | ||
String location, | ||
String image, | ||
ShowSeatServiceResponse seats, | ||
ShowTicketingSiteServiceResponse ticketingSiteInfos, | ||
List<ShowTicketingTimeServiceResponse> ticketingTimes | ||
) { | ||
|
||
public ShowWithTicketingTimesServiceResponse( | ||
ShowWithTicketingTimesDomainResponse domainResponse | ||
) { | ||
this( | ||
domainResponse.show().id(), | ||
domainResponse.show().title(), | ||
domainResponse.show().content(), | ||
domainResponse.show().startDate(), | ||
domainResponse.show().endDate(), | ||
domainResponse.show().location(), | ||
domainResponse.show().image(), | ||
ShowSeatServiceResponse.from(domainResponse.show().seatPrices()), | ||
ShowTicketingSiteServiceResponse.from(domainResponse.show().ticketingSites()), | ||
toShowTicketingTimeServiceResponses(domainResponse.ticketingTimes()) | ||
); | ||
} | ||
|
||
private static List<ShowTicketingTimeServiceResponse> toShowTicketingTimeServiceResponses( | ||
List<ShowTicketingTimeDomainResponse> ticketingSites | ||
) { | ||
return ticketingSites.stream() | ||
.map(ShowTicketingTimeServiceResponse::from) | ||
.toList(); | ||
} | ||
|
||
} |
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
11 changes: 11 additions & 0 deletions
11
.../main/java/org/example/dto/artist/response/ArtistKoreanNamesWithShowIdDomainResponse.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,11 @@ | ||
package org.example.dto.artist.response; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
public record ArtistKoreanNamesWithShowIdDomainResponse( | ||
UUID showId, | ||
List<ArtistKoreanNameDomainResponse> koreanNameDomainResponses | ||
) { | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
...main/src/main/java/org/example/dto/genre/response/GenreNamesWithShowIdDomainResponse.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,11 @@ | ||
package org.example.dto.genre.response; | ||
|
||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
public record GenreNamesWithShowIdDomainResponse( | ||
UUID showId, | ||
List<GenreNameDomainResponse> genreNames | ||
) { | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
...ain/src/main/java/org/example/dto/show/response/ShowWithTicketingTimesDomainResponse.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,10 @@ | ||
package org.example.dto.show.response; | ||
|
||
import java.util.List; | ||
|
||
public record ShowWithTicketingTimesDomainResponse( | ||
ShowDomainResponse show, | ||
List<ShowTicketingTimeDomainResponse> ticketingTimes | ||
) { | ||
|
||
} |
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
Oops, something went wrong.