-
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
5fe52cd
commit bb0f138
Showing
107 changed files
with
2,406 additions
and
552 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
28 changes: 28 additions & 0 deletions
28
.../java/com/example/artist/controller/dto/param/ArtistUnsubscriptionPaginationApiParam.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,28 @@ | ||
package com.example.artist.controller.dto.param; | ||
|
||
import com.example.artist.service.dto.param.ArtistUnsubscriptionPaginationServiceParam; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.UUID; | ||
|
||
public record ArtistUnsubscriptionPaginationApiParam( | ||
@Schema(description = "아티스트 ID") | ||
UUID id, | ||
@Schema(description = "아티스트 이미지 URL") | ||
String imageUrl, | ||
@Schema(description = "아티스트 한글 이름") | ||
String koreanName, | ||
@Schema(description = "아티스트 영문 이름") | ||
String englishName | ||
) { | ||
|
||
public static ArtistUnsubscriptionPaginationApiParam from( | ||
ArtistUnsubscriptionPaginationServiceParam param | ||
) { | ||
return new ArtistUnsubscriptionPaginationApiParam( | ||
param.artistId(), | ||
param.artistImageUrl(), | ||
param.artistKoreanName(), | ||
param.artistEnglishName() | ||
); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...main/java/com/example/artist/controller/dto/request/ArtistFilterTotalCountApiRequest.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,40 @@ | ||
package com.example.artist.controller.dto.request; | ||
|
||
import com.example.artist.service.dto.request.ArtistFilterTotalCountServiceRequest; | ||
import com.example.artist.vo.ArtistApiType; | ||
import com.example.artist.vo.ArtistGenderApiType; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import java.util.UUID; | ||
import org.example.util.ValidateStatus; | ||
|
||
public record ArtistFilterTotalCountApiRequest( | ||
@Schema(description = "아티스트 성별") | ||
List<ArtistGenderApiType> artistGenderApiTypes, | ||
|
||
@Schema(description = "아티스트 타입") | ||
List<ArtistApiType> artistApiTypes, | ||
|
||
@Schema(description = "장르 ID 목록") | ||
List<UUID> genreIds | ||
) { | ||
|
||
public ArtistFilterTotalCountApiRequest( | ||
List<ArtistGenderApiType> artistGenderApiTypes, | ||
List<ArtistApiType> artistApiTypes, | ||
List<UUID> genreIds | ||
) { | ||
this.artistGenderApiTypes = ValidateStatus.checkNullOrEmpty(artistGenderApiTypes); | ||
this.artistApiTypes = ValidateStatus.checkNullOrEmpty(artistApiTypes); | ||
this.genreIds = ValidateStatus.checkNullOrEmpty(genreIds); | ||
} | ||
|
||
public ArtistFilterTotalCountServiceRequest toServiceRequest(UUID userId) { | ||
return ArtistFilterTotalCountServiceRequest.builder() | ||
.artistGenderApiTypes(artistGenderApiTypes) | ||
.artistApiTypes(artistApiTypes) | ||
.genreIds(genreIds) | ||
.userId(userId) | ||
.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
68 changes: 68 additions & 0 deletions
68
...a/com/example/artist/controller/dto/request/ArtistUnsubscriptionPaginationApiRequest.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,68 @@ | ||
package com.example.artist.controller.dto.request; | ||
|
||
import com.example.artist.service.dto.request.ArtistUnsubscriptionPaginationServiceRequest; | ||
import com.example.artist.vo.ArtistApiType; | ||
import com.example.artist.vo.ArtistGenderApiType; | ||
import com.example.artist.vo.ArtistSortStandardApiType; | ||
import com.example.vo.SubscriptionStatusApiType; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import java.util.UUID; | ||
import org.example.util.ValidateStatus; | ||
|
||
@Schema | ||
public record ArtistUnsubscriptionPaginationApiRequest( | ||
@Parameter( | ||
description = "정렬 기준, default: ENGLISH_NAME_ASC", | ||
schema = @Schema(implementation = ArtistSortStandardApiType.class) | ||
) | ||
ArtistSortStandardApiType sortStandard, | ||
|
||
@Parameter(description = "아티스트 성별 목록") | ||
List<ArtistGenderApiType> artistGenderApiTypes, | ||
|
||
@Parameter(description = "아티스트 타입 목록") | ||
List<ArtistApiType> artistApiTypes, | ||
|
||
@Parameter(description = "장르 ID 목록") | ||
List<UUID> genreIds, | ||
|
||
@Parameter(description = "이전 페이지네이션 마지막 데이터의 ID / 최초 조회라면 null") | ||
UUID cursor, | ||
|
||
@Parameter(description = "조회하는 데이터 개수", required = true) | ||
int size | ||
) { | ||
|
||
public ArtistUnsubscriptionPaginationApiRequest( | ||
ArtistSortStandardApiType sortStandard, | ||
List<ArtistGenderApiType> artistGenderApiTypes, | ||
List<ArtistApiType> artistApiTypes, | ||
List<UUID> genreIds, | ||
UUID cursor, | ||
int size | ||
) { | ||
this.sortStandard = | ||
sortStandard == null ? ArtistSortStandardApiType.ENGLISH_NAME_ASC : sortStandard; | ||
this.artistGenderApiTypes = ValidateStatus.checkNullOrEmpty(artistGenderApiTypes); | ||
this.artistApiTypes = ValidateStatus.checkNullOrEmpty(artistApiTypes); | ||
this.genreIds = ValidateStatus.checkNullOrEmpty(genreIds); | ||
this.cursor = cursor; | ||
this.size = size; | ||
} | ||
|
||
|
||
public ArtistUnsubscriptionPaginationServiceRequest toServiceRequest(UUID userId) { | ||
return ArtistUnsubscriptionPaginationServiceRequest.builder() | ||
.subscriptionStatusApiType(SubscriptionStatusApiType.UNSUBSCRIBED) | ||
.sortStandard(sortStandard) | ||
.artistGenderApiTypes(artistGenderApiTypes) | ||
.artistApiTypes(artistApiTypes) | ||
.genreIds(genreIds) | ||
.userId(userId) | ||
.cursor(cursor) | ||
.size(size) | ||
.build(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...in/java/com/example/artist/controller/dto/response/ArtistFilterTotalCountApiResponse.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,14 @@ | ||
package com.example.artist.controller.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
public record ArtistFilterTotalCountApiResponse( | ||
@Schema(description = "필터링한 아티스트 총 개수") | ||
int totalCount | ||
) { | ||
|
||
public static ArtistFilterTotalCountApiResponse from(int totalCount) { | ||
return new ArtistFilterTotalCountApiResponse(totalCount); | ||
} | ||
|
||
} |
15 changes: 0 additions & 15 deletions
15
...src/main/java/com/example/artist/controller/dto/response/ArtistPaginationApiResponse.java
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
...main/java/com/example/artist/controller/dto/response/ArtistUnsubscriptionApiResponse.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
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.