-
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
d2dbeab
commit 01801e3
Showing
39 changed files
with
561 additions
and
133 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
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
43 changes: 43 additions & 0 deletions
43
...-api/src/main/java/com/example/show/controller/dto/param/ShowAlertPaginationApiParam.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,43 @@ | ||
package com.example.show.controller.dto.param; | ||
|
||
import com.example.show.service.dto.param.ShowAlertPaginationServiceParam; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
import org.example.util.DateTimeUtil; | ||
|
||
public record ShowAlertPaginationApiParam( | ||
@Schema(description = "공연 ID") | ||
UUID id, | ||
|
||
@Schema(description = "공연 제목") | ||
String title, | ||
|
||
@Schema(description = "공연 시작 날짜") | ||
String startAt, | ||
|
||
@Schema(description = "공연 마지막 날짜") | ||
String endAt, | ||
|
||
@Schema(description = "공연 장소") | ||
String location, | ||
|
||
@Schema(description = "공연 이미지") | ||
String image, | ||
|
||
@Schema(description = "cursorValue로서 공연 티켓팅 날짜") | ||
LocalDateTime ticketingAt | ||
) { | ||
|
||
public static ShowAlertPaginationApiParam from(ShowAlertPaginationServiceParam serviceParam) { | ||
return new ShowAlertPaginationApiParam( | ||
serviceParam.id(), | ||
serviceParam.title(), | ||
DateTimeUtil.formatDate(serviceParam.startAt()), | ||
DateTimeUtil.formatDate(serviceParam.endAt()), | ||
serviceParam.location(), | ||
serviceParam.image(), | ||
serviceParam.ticketingAt() | ||
); | ||
} | ||
} |
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
.../src/main/java/com/example/show/controller/dto/request/ShowAlertPaginationApiRequest.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.show.controller.dto.request; | ||
|
||
import com.example.show.service.dto.request.ShowAlertPaginationServiceRequest; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
|
||
public record ShowAlertPaginationApiRequest( | ||
|
||
@Parameter(description = "페이지네이션 데이터 개수", required = true) | ||
int size, | ||
@Parameter(description = "이전 페이지네이션 마지막 데이터의 ID / 최초 조회라면 null") | ||
UUID cursorId, | ||
|
||
@Parameter(description = "이전 페이지네이션 마지막 데이터의 ticketingAt / 최초 조회라면 null") | ||
LocalDateTime curSorValue | ||
) { | ||
|
||
public ShowAlertPaginationServiceRequest toServiceRequest(UUID userId) { | ||
return ShowAlertPaginationServiceRequest.builder() | ||
.userId(userId) | ||
.size(size) | ||
.cursorId(cursorId) | ||
.cursorValue(curSorValue) | ||
.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
29 changes: 25 additions & 4 deletions
29
...main/java/com/example/show/controller/dto/response/InterestShowPaginationApiResponse.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,30 +1,51 @@ | ||
package com.example.show.controller.dto.response; | ||
|
||
import com.example.show.service.dto.response.InterestShowPaginationServiceResponse; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.time.LocalDateTime; | ||
import java.util.UUID; | ||
import lombok.Builder; | ||
import org.example.util.DateTimeUtil; | ||
|
||
@Builder | ||
public record InterestShowPaginationApiResponse( | ||
@Schema(description = "공연 ID") | ||
UUID id, | ||
|
||
@Schema(description = "cursorID로서 관심 공연 ID") | ||
UUID interestShowId, | ||
|
||
@Schema(description = "cursorValue로서 관심 공연 지정 시간") | ||
LocalDateTime interestedAt, | ||
|
||
@Schema(description = "공연 이름") | ||
String title, | ||
|
||
@Schema(description = "공연 시작 날짜") | ||
String startAt, | ||
|
||
@Schema(description = "공연 종료 날짜") | ||
String endAt, | ||
|
||
@Schema(description = "공연 장소") | ||
String location, | ||
String posterImageURL, | ||
String interestedAt | ||
|
||
@Schema(description = "공연 포스터 이미지 주소") | ||
String posterImageURL | ||
) { | ||
|
||
public static InterestShowPaginationApiResponse from(InterestShowPaginationServiceResponse response) { | ||
public static InterestShowPaginationApiResponse from( | ||
InterestShowPaginationServiceResponse response | ||
) { | ||
return InterestShowPaginationApiResponse.builder() | ||
.id(response.showId()) | ||
.interestShowId(response.interestShowId()) | ||
.interestedAt(response.interestedAt()) | ||
.title(response.title()) | ||
.startAt(DateTimeUtil.formatDate(response.startAt())) | ||
.endAt(DateTimeUtil.formatDate(response.endAt())) | ||
.location(response.location()) | ||
.posterImageURL(response.posterImageURL()) | ||
.interestedAt(DateTimeUtil.formatDateTime(response.interestedAt())) | ||
.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
Oops, something went wrong.