From 4d68c03dd99a13fca2835163858fa716a958770e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=AF=BC=EC=B0=AC=EA=B8=B0?= Date: Sun, 11 Aug 2024 14:04:17 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B3=B5=EC=97=B0=20=EB=AA=A9=EB=A1=9D?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20(#93)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArtistSearchPaginationApiRequest.java | 8 +- ...rtistSubscriptionPaginationApiRequest.java | 13 +- ...istUnsubscriptionPaginationApiRequest.java | 10 +- .../artist/service/ArtistAdminService.java | 9 +- .../example/artist/service/ArtistService.java | 7 +- .../ArtistSearchPaginationServiceRequest.java | 5 +- ...tSubscriptionPaginationServiceRequest.java | 4 +- ...nsubscriptionPaginationServiceRequest.java | 4 +- .../example/artist/vo/ArtistSortApiType.java | 19 + .../artist/vo/ArtistSortStandardApiType.java | 19 - .../show/controller/ShowController.java | 115 +-- .../dto/request/ShowPaginationApiRequest.java | 34 + .../ShowAlertPaginationApiResponse.java | 2 + .../ShowArtistPaginationApiParam.java | 23 + .../response/ShowArtistSimpleApiResponse.java | 14 + .../response/ShowGenrePaginationApiParam.java | 19 + .../response/ShowGenreSimpleApiResponse.java | 8 + .../ShowInterestPaginationApiResponse.java | 2 + .../dto/response/ShowPaginationApiParam.java | 65 ++ .../response/ShowPaginationApiResponse.java | 15 - .../dto/response/ShowSimpleApiResponse.java | 25 +- .../ShowTicketingTimePaginationApiParam.java | 20 + .../show/controller/vo/ShowSortApiType.java | 14 + .../com/example/show/service/ShowService.java | 13 + .../request/ShowPaginationServiceRequest.java | 27 + .../ShowArtistSimpleServiceResponse.java | 23 + .../response/ShowDetailServiceResponse.java | 2 +- .../ShowGenreSimpleServiceResponse.java | 19 + .../ShowPaginationServiceResponse.java | 57 ++ .../ShowTicketingTimeServiceParam.java | 20 + .../fixture/dto/ArtistRequestDtoFixture.java | 8 +- .../main/resources/application-domain-dev.yml | 3 +- .../resources/application-domain-local.yml | 7 +- .../common-domain/src/main/resources/data.sql | 704 +++++++++++------- .../src/main/resources/schema.sql | 25 +- .../ArtistPaginationDomainRequest.java | 4 +- .../ArtistSearchPaginationDomainRequest.java | 4 +- .../request/ShowCreationDomainRequest.java | 1 + .../request/ShowPaginationDomainRequest.java | 17 + .../response/ShowDetailDomainResponse.java | 2 +- .../dto/show/response/ShowDomainResponse.java | 2 + .../ShowPaginationDomainResponse.java | 12 + .../java/org/example/entity/show/Show.java | 7 +- .../entity/show/ShowTicketingTime.java | 2 +- .../example/entity/show/info/SeatPrices.java | 2 +- .../entity/show/info/ShowTicketingTimes.java | 7 + .../entity/show/info/TicketingSites.java | 2 +- .../artist/ArtistQuerydslRepositoryImpl.java | 4 +- .../ArtistSearchQuerydslRepositoryImpl.java | 4 +- .../show/ShowQuerydslRepository.java | 4 + .../show/ShowQuerydslRepositoryImpl.java | 225 ++++-- .../org/example/usecase/show/ShowUseCase.java | 13 +- ...ardDomainType.java => ArtistSortType.java} | 2 +- .../java/org/example/vo/ShowSortType.java | 5 + .../artist/ArtistRepositoryTest.java | 12 +- .../artist/ArtistSearchRepositoryTest.java | 4 +- .../repository/show/ShowRepositoryTest.java | 1 - .../example/fixture/domain/ShowFixture.java | 2 + .../fixture/dto/ArtistRequestDtoFixture.java | 4 +- .../java/org/example/util/DateTimeUtil.java | 14 +- 60 files changed, 1161 insertions(+), 557 deletions(-) create mode 100644 app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortApiType.java delete mode 100644 app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortStandardApiType.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/request/ShowPaginationApiRequest.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistPaginationApiParam.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistSimpleApiResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenrePaginationApiParam.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenreSimpleApiResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiParam.java delete mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowTicketingTimePaginationApiParam.java create mode 100644 app/api/show-api/src/main/java/com/example/show/controller/vo/ShowSortApiType.java create mode 100644 app/api/show-api/src/main/java/com/example/show/service/dto/request/ShowPaginationServiceRequest.java create mode 100644 app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowArtistSimpleServiceResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowGenreSimpleServiceResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowPaginationServiceResponse.java create mode 100644 app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowTicketingTimeServiceParam.java create mode 100644 app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowPaginationDomainRequest.java create mode 100644 app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowPaginationDomainResponse.java rename app/domain/show-domain/src/main/java/org/example/vo/{ArtistSortStandardDomainType.java => ArtistSortType.java} (72%) create mode 100644 app/domain/show-domain/src/main/java/org/example/vo/ShowSortType.java diff --git a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSearchPaginationApiRequest.java b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSearchPaginationApiRequest.java index e0d238b3..8214e3e0 100644 --- a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSearchPaginationApiRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSearchPaginationApiRequest.java @@ -1,7 +1,7 @@ package com.example.artist.controller.dto.request; import com.example.artist.service.dto.request.ArtistSearchPaginationServiceRequest; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; import java.util.UUID; @@ -10,9 +10,9 @@ public record ArtistSearchPaginationApiRequest( @Parameter( description = "정렬 기준, default: ENGLISH_NAME_ASC", - schema = @Schema(implementation = ArtistSortStandardApiType.class) + schema = @Schema(implementation = ArtistSortApiType.class) ) - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, @Parameter(description = "이전 페이지네이션 마지막 데이터의 ID / 최초 조회라면 null") UUID cursor, @@ -26,7 +26,7 @@ public record ArtistSearchPaginationApiRequest( public ArtistSearchPaginationApiRequest { if (sortStandard == null) { - sortStandard = ArtistSortStandardApiType.ENGLISH_NAME_ASC; + sortStandard = ArtistSortApiType.ENGLISH_NAME_ASC; } } diff --git a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSubscriptionPaginationApiRequest.java b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSubscriptionPaginationApiRequest.java index 4a951690..d71c76e0 100644 --- a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSubscriptionPaginationApiRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistSubscriptionPaginationApiRequest.java @@ -1,7 +1,7 @@ package com.example.artist.controller.dto.request; import com.example.artist.service.dto.request.ArtistSubscriptionPaginationServiceRequest; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import com.example.vo.SubscriptionStatusApiType; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; @@ -12,9 +12,9 @@ public record ArtistSubscriptionPaginationApiRequest( @Parameter( description = "정렬 기준, default: ENGLISH_NAME_ASC", - schema = @Schema(implementation = ArtistSortStandardApiType.class) + schema = @Schema(implementation = ArtistSortApiType.class) ) - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sort, @Parameter(description = "이전 페이지네이션 마지막 데이터의 ID / 최초 조회라면 null") UUID cursor, @@ -24,12 +24,11 @@ public record ArtistSubscriptionPaginationApiRequest( ) { public ArtistSubscriptionPaginationApiRequest( - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sort, UUID cursor, int size ) { - this.sortStandard = - sortStandard == null ? ArtistSortStandardApiType.ENGLISH_NAME_ASC : sortStandard; + this.sort = sort == null ? ArtistSortApiType.ENGLISH_NAME_ASC : sort; this.cursor = cursor; this.size = size; } @@ -38,7 +37,7 @@ public ArtistSubscriptionPaginationServiceRequest toServiceRequest(UUID userId) return ArtistSubscriptionPaginationServiceRequest.builder() .subscriptionStatusApiType(SubscriptionStatusApiType.SUBSCRIBED) .size(size) - .sortStandard(sortStandard) + .sortStandard(sort) .cursor(cursor) .userId(userId) .build(); diff --git a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistUnsubscriptionPaginationApiRequest.java b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistUnsubscriptionPaginationApiRequest.java index f96bd6c1..df75d182 100644 --- a/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistUnsubscriptionPaginationApiRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/controller/dto/request/ArtistUnsubscriptionPaginationApiRequest.java @@ -3,7 +3,7 @@ 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.artist.vo.ArtistSortApiType; import com.example.vo.SubscriptionStatusApiType; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Schema; @@ -15,9 +15,9 @@ public record ArtistUnsubscriptionPaginationApiRequest( @Parameter( description = "정렬 기준, default: ENGLISH_NAME_ASC", - schema = @Schema(implementation = ArtistSortStandardApiType.class) + schema = @Schema(implementation = ArtistSortApiType.class) ) - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, @Parameter(description = "아티스트 성별 목록") List artistGenderApiTypes, @@ -36,7 +36,7 @@ public record ArtistUnsubscriptionPaginationApiRequest( ) { public ArtistUnsubscriptionPaginationApiRequest( - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, List artistGenderApiTypes, List artistApiTypes, List genreIds, @@ -44,7 +44,7 @@ public ArtistUnsubscriptionPaginationApiRequest( int size ) { this.sortStandard = - sortStandard == null ? ArtistSortStandardApiType.ENGLISH_NAME_ASC : sortStandard; + sortStandard == null ? ArtistSortApiType.ENGLISH_NAME_ASC : sortStandard; this.artistGenderApiTypes = ValidateStatus.checkNullOrEmpty(artistGenderApiTypes); this.artistApiTypes = ValidateStatus.checkNullOrEmpty(artistApiTypes); this.genreIds = ValidateStatus.checkNullOrEmpty(genreIds); diff --git a/app/api/show-api/src/main/java/com/example/artist/service/ArtistAdminService.java b/app/api/show-api/src/main/java/com/example/artist/service/ArtistAdminService.java index 1858a973..76ba49e5 100644 --- a/app/api/show-api/src/main/java/com/example/artist/service/ArtistAdminService.java +++ b/app/api/show-api/src/main/java/com/example/artist/service/ArtistAdminService.java @@ -25,9 +25,7 @@ public class ArtistAdminService { private final FileUploadComponent fileUploadComponent; public void save(ArtistCreateServiceRequest artistCreateServiceRequest) { - String imageUrl = fileUploadComponent.uploadFile("artist", - artistCreateServiceRequest.image()); - + String imageUrl = fileUploadComponent.uploadFile("artists", artistCreateServiceRequest.image()); Artist artist = artistCreateServiceRequest.toArtistWithImageUrl(imageUrl); artistUseCase.save(artist, artistCreateServiceRequest.genreIds()); } @@ -62,10 +60,7 @@ public ArtistDetailServiceResponse findArtistById(UUID id) { } public void updateArtist(UUID id, ArtistUpdateServiceRequest artistUpdateServiceRequest) { - String imageUrl = fileUploadComponent.uploadFile( - "artist", - artistUpdateServiceRequest.image() - ); + String imageUrl = fileUploadComponent.uploadFile("artist", artistUpdateServiceRequest.image()); Artist artist = artistUpdateServiceRequest.toArtist(imageUrl); try { diff --git a/app/api/show-api/src/main/java/com/example/artist/service/ArtistService.java b/app/api/show-api/src/main/java/com/example/artist/service/ArtistService.java index ab773ccc..be6a8d39 100644 --- a/app/api/show-api/src/main/java/com/example/artist/service/ArtistService.java +++ b/app/api/show-api/src/main/java/com/example/artist/service/ArtistService.java @@ -115,7 +115,12 @@ public ArtistUnsubscriptionServiceResponse unsubscribe( public PaginationServiceResponse findArtistSubscriptions( ArtistSubscriptionPaginationServiceRequest request ) { - List subscriptionArtistIds = getSubscriptionArtistIds(request.userId()); + List subscriptions = artistSubscriptionUseCase.findSubscriptionList( + request.userId() + ); + List subscriptionArtistIds = subscriptions.stream() + .map(ArtistSubscription::getArtistId) + .toList(); if (subscriptionArtistIds.isEmpty()) { return PaginationServiceResponse.of(List.of(), false); diff --git a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSearchPaginationServiceRequest.java b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSearchPaginationServiceRequest.java index ecb5daf0..de849921 100644 --- a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSearchPaginationServiceRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSearchPaginationServiceRequest.java @@ -1,6 +1,6 @@ package com.example.artist.service.dto.request; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import java.util.UUID; import lombok.Builder; import org.example.dto.artist.request.ArtistSearchPaginationDomainRequest; @@ -8,7 +8,7 @@ @Builder public record ArtistSearchPaginationServiceRequest( - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, UUID cursor, int size, String search @@ -22,5 +22,4 @@ public ArtistSearchPaginationDomainRequest toDomainRequest() { .search(StringNormalizer.removeWhitespaceAndLowerCase(search)) .build(); } - } diff --git a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSubscriptionPaginationServiceRequest.java b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSubscriptionPaginationServiceRequest.java index 4356a525..d838ae86 100644 --- a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSubscriptionPaginationServiceRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistSubscriptionPaginationServiceRequest.java @@ -1,6 +1,6 @@ package com.example.artist.service.dto.request; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import com.example.vo.SubscriptionStatusApiType; import java.util.List; import java.util.UUID; @@ -12,7 +12,7 @@ public record ArtistSubscriptionPaginationServiceRequest( SubscriptionStatusApiType subscriptionStatusApiType, int size, - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, UUID cursor, UUID userId ) { diff --git a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistUnsubscriptionPaginationServiceRequest.java b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistUnsubscriptionPaginationServiceRequest.java index 0dd426cb..f1bae7f9 100644 --- a/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistUnsubscriptionPaginationServiceRequest.java +++ b/app/api/show-api/src/main/java/com/example/artist/service/dto/request/ArtistUnsubscriptionPaginationServiceRequest.java @@ -2,7 +2,7 @@ import com.example.artist.vo.ArtistApiType; import com.example.artist.vo.ArtistGenderApiType; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import com.example.vo.SubscriptionStatusApiType; import java.util.List; import java.util.UUID; @@ -13,7 +13,7 @@ @Builder public record ArtistUnsubscriptionPaginationServiceRequest( SubscriptionStatusApiType subscriptionStatusApiType, - ArtistSortStandardApiType sortStandard, + ArtistSortApiType sortStandard, List artistGenderApiTypes, List artistApiTypes, List genreIds, diff --git a/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortApiType.java b/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortApiType.java new file mode 100644 index 00000000..fcebc71d --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortApiType.java @@ -0,0 +1,19 @@ +package com.example.artist.vo; + +import org.example.vo.ArtistSortType; + +public enum ArtistSortApiType { + KOREAN_NAME_ASC, + KOREAN_NAME_DESC, + ENGLISH_NAME_ASC, + ENGLISH_NAME_DESC; + + public ArtistSortType toDomainType() { + return switch (this) { + case KOREAN_NAME_ASC -> ArtistSortType.KOREAN_NAME_ASC; + case KOREAN_NAME_DESC -> ArtistSortType.KOREAN_NAME_DESC; + case ENGLISH_NAME_ASC -> ArtistSortType.ENGLISH_NAME_ASC; + case ENGLISH_NAME_DESC -> ArtistSortType.ENGLISH_NAME_DESC; + }; + } +} diff --git a/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortStandardApiType.java b/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortStandardApiType.java deleted file mode 100644 index d83ae026..00000000 --- a/app/api/show-api/src/main/java/com/example/artist/vo/ArtistSortStandardApiType.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.example.artist.vo; - -import org.example.vo.ArtistSortStandardDomainType; - -public enum ArtistSortStandardApiType { - KOREAN_NAME_ASC, - KOREAN_NAME_DESC, - ENGLISH_NAME_ASC, - ENGLISH_NAME_DESC; - - public ArtistSortStandardDomainType toDomainType() { - return switch (this) { - case KOREAN_NAME_ASC -> ArtistSortStandardDomainType.KOREAN_NAME_ASC; - case KOREAN_NAME_DESC -> ArtistSortStandardDomainType.KOREAN_NAME_DESC; - case ENGLISH_NAME_ASC -> ArtistSortStandardDomainType.ENGLISH_NAME_ASC; - case ENGLISH_NAME_DESC -> ArtistSortStandardDomainType.ENGLISH_NAME_DESC; - }; - } -} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/ShowController.java b/app/api/show-api/src/main/java/com/example/show/controller/ShowController.java index 44808bfc..edda691e 100644 --- a/app/api/show-api/src/main/java/com/example/show/controller/ShowController.java +++ b/app/api/show-api/src/main/java/com/example/show/controller/ShowController.java @@ -1,26 +1,25 @@ package com.example.show.controller; -import com.example.artist.controller.dto.response.ArtistSimpleApiResponse; -import com.example.genre.controller.dto.response.GenreSimpleApiResponse; import com.example.show.controller.dto.param.ShowSearchPaginationApiParam; import com.example.show.controller.dto.request.ShowAlertRegistrationApiRequest; import com.example.show.controller.dto.request.ShowInterestPaginationApiRequest; +import com.example.show.controller.dto.request.ShowPaginationApiRequest; import com.example.show.controller.dto.request.ShowSearchPaginationApiRequest; import com.example.show.controller.dto.response.ShowAlertPaginationApiResponse; import com.example.show.controller.dto.response.ShowDetailApiResponse; import com.example.show.controller.dto.response.ShowInterestApiResponse; import com.example.show.controller.dto.response.ShowInterestPaginationApiResponse; -import com.example.show.controller.dto.response.ShowPaginationApiResponse; -import com.example.show.controller.dto.response.ShowSimpleApiResponse; -import com.example.show.controller.dto.response.TicketingAndShowInfoApiResponse; +import com.example.show.controller.dto.response.ShowPaginationApiParam; import com.example.show.service.ShowService; +import com.example.show.service.dto.response.ShowPaginationServiceResponse; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.validation.Valid; -import java.util.List; +import java.time.LocalDateTime; import java.util.UUID; import lombok.RequiredArgsConstructor; import org.example.dto.response.PaginationApiResponse; +import org.example.dto.response.PaginationServiceResponse; import org.example.security.dto.AuthenticatedUser; import org.springdoc.core.annotations.ParameterObject; import org.springframework.http.ResponseEntity; @@ -41,42 +40,28 @@ public class ShowController { private final ShowService showService; - private String image = "https://thumb.mtstarnews.com/06/2023/06/2023062914274537673_1.jpg"; - @GetMapping @Operation(summary = "공연 목록 조회") - public ResponseEntity getShows( - @RequestParam(required = false) ShowSearchPaginationApiRequest param + public ResponseEntity> getShows( + @ParameterObject ShowPaginationApiRequest request ) { + LocalDateTime now = LocalDateTime.now(); + + PaginationServiceResponse response = showService.findShows( + request.toServiceRequest(now) + ); + + var data = response.data().stream() + .map(ShowPaginationApiParam::from) + .toList(); + return ResponseEntity.ok( - new ShowPaginationApiResponse( - List.of( - new ShowSimpleApiResponse( - UUID.randomUUID(), - "2021 서울재즈페스티벌", - new ArtistSimpleApiResponse( - UUID.randomUUID(), - "윈터", - image - ), - new GenreSimpleApiResponse( - UUID.randomUUID(), - "재즈", - image - ), - List.of( - new TicketingAndShowInfoApiResponse( - "2021-10-01 14:00:00", - "2021-10-03 14:00:00", - image - ) - ), - image - ) - ), - false - ) + PaginationApiResponse.builder() + .data(data) + .hasNext(response.hasNext()) + .build() ); + } @PostMapping("/{showId}/interest") @@ -95,33 +80,7 @@ public ResponseEntity getInterests( @RequestParam(required = false) ShowInterestPaginationApiRequest param ) { return ResponseEntity.ok( - new ShowInterestPaginationApiResponse( - List.of( - new ShowSimpleApiResponse( - UUID.randomUUID(), - "2021 서울재즈페스티벌", - new ArtistSimpleApiResponse( - UUID.randomUUID(), - "윈터", - image - ), - new GenreSimpleApiResponse( - UUID.randomUUID(), - "재즈", - image - ), - List.of( - new TicketingAndShowInfoApiResponse( - "2021-10-01 14:00:00", - "2021-10-03 14:00:00", - image - ) - ), - image - ) - ), - false - ) + ShowInterestPaginationApiResponse.builder().build() ); } @@ -153,33 +112,7 @@ public ResponseEntity getAlerts( @RequestParam(required = false) ShowInterestPaginationApiRequest param ) { return ResponseEntity.ok( - new ShowAlertPaginationApiResponse( - List.of( - new ShowSimpleApiResponse( - UUID.randomUUID(), - "2021 서울재즈페스티벌", - new ArtistSimpleApiResponse( - UUID.randomUUID(), - "윈터", - image - ), - new GenreSimpleApiResponse( - UUID.randomUUID(), - "재즈", - image - ), - List.of( - new TicketingAndShowInfoApiResponse( - "2021-10-01 14:00:00", - "2021-10-03 14:00:00", - image - ) - ), - image - ) - ), - false - ) + ShowAlertPaginationApiResponse.builder().build() ); } diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/request/ShowPaginationApiRequest.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/request/ShowPaginationApiRequest.java new file mode 100644 index 00000000..790a2bd0 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/request/ShowPaginationApiRequest.java @@ -0,0 +1,34 @@ +package com.example.show.controller.dto.request; + +import com.example.show.controller.vo.ShowSortApiType; +import com.example.show.service.dto.request.ShowPaginationServiceRequest; +import io.swagger.v3.oas.annotations.Parameter; +import java.time.LocalDateTime; +import java.util.UUID; +import org.springdoc.core.annotations.ParameterObject; + +@ParameterObject +public record ShowPaginationApiRequest( + + @Parameter(required = true, description = "정렬 방향") + ShowSortApiType sort, + + @Parameter(required = true, description = "오픈예정 티켓만 보기") + boolean onlyOpenSchedule, + + @Parameter(description = "이전 페이지네이션 마지막 데이터의 ID / 최초 조회라면 null") + UUID cursor, + + @Parameter(required = true, description = "조회하려는 데이터 개수") + int size +) { + + public ShowPaginationServiceRequest toServiceRequest(LocalDateTime now) { + return ShowPaginationServiceRequest.builder() + .sort(sort) + .cursor(cursor) + .size(size) + .now(now) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowAlertPaginationApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowAlertPaginationApiResponse.java index 4f727e84..263f07f4 100644 --- a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowAlertPaginationApiResponse.java +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowAlertPaginationApiResponse.java @@ -2,7 +2,9 @@ import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; +import lombok.Builder; +@Builder public record ShowAlertPaginationApiResponse( @Schema(description = "공연 목록") diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistPaginationApiParam.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistPaginationApiParam.java new file mode 100644 index 00000000..67123752 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistPaginationApiParam.java @@ -0,0 +1,23 @@ +package com.example.show.controller.dto.response; + +import com.example.show.service.dto.response.ShowArtistSimpleServiceResponse; +import java.util.UUID; +import lombok.Builder; + +@Builder +public record ShowArtistPaginationApiParam( + UUID id, + String koreanName, + String englishName, + String image +) { + + public static ShowArtistPaginationApiParam from(ShowArtistSimpleServiceResponse response) { + return ShowArtistPaginationApiParam.builder() + .id(response.id()) + .koreanName(response.koreanName()) + .englishName(response.englishName()) + .image(response.image()) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistSimpleApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistSimpleApiResponse.java new file mode 100644 index 00000000..0bb620b8 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowArtistSimpleApiResponse.java @@ -0,0 +1,14 @@ +package com.example.show.controller.dto.response; + +import java.util.UUID; +import lombok.Builder; + +@Builder +public record ShowArtistSimpleApiResponse( + UUID id, + String koreanName, + String englishName, + String image +) { + +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenrePaginationApiParam.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenrePaginationApiParam.java new file mode 100644 index 00000000..b7c7132b --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenrePaginationApiParam.java @@ -0,0 +1,19 @@ +package com.example.show.controller.dto.response; + +import com.example.show.service.dto.response.ShowGenreSimpleServiceResponse; +import java.util.UUID; +import lombok.Builder; + +@Builder +public record ShowGenrePaginationApiParam( + UUID id, + String name +) { + + public static ShowGenrePaginationApiParam from(ShowGenreSimpleServiceResponse response) { + return ShowGenrePaginationApiParam.builder() + .id(response.id()) + .name(response.name()) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenreSimpleApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenreSimpleApiResponse.java new file mode 100644 index 00000000..9ec61256 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowGenreSimpleApiResponse.java @@ -0,0 +1,8 @@ +package com.example.show.controller.dto.response; + +public record ShowGenreSimpleApiResponse( + String id, + String name +) { + +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowInterestPaginationApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowInterestPaginationApiResponse.java index 8373d1c2..2f8e78b3 100644 --- a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowInterestPaginationApiResponse.java +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowInterestPaginationApiResponse.java @@ -2,7 +2,9 @@ import io.swagger.v3.oas.annotations.media.Schema; import java.util.List; +import lombok.Builder; +@Builder public record ShowInterestPaginationApiResponse( @Schema(description = "공연 목록") List shows, diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiParam.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiParam.java new file mode 100644 index 00000000..b7c0ca80 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiParam.java @@ -0,0 +1,65 @@ +package com.example.show.controller.dto.response; + +import com.example.show.service.dto.response.ShowPaginationServiceResponse; +import io.swagger.v3.oas.annotations.media.Schema; +import java.util.List; +import java.util.UUID; +import lombok.Builder; + +@Builder +public record ShowPaginationApiParam( + + @Schema(description = "공연 ID") + UUID id, + + @Schema(description = "공연 이름") + String title, + + @Schema(description = "공연 장소") + String location, + + @Schema(description = "공연 포스터 이미지 주소") + String posterImageURL, + + @Schema(description = "예매일") + String reservationAt, + + @Schema(description = "오픈 예정인 티켓팅 일정이 있는지 여부") + boolean hasTicketingOpenSchedule, + + @Schema(description = "아티스트 정보") + List artists, + + @Schema(description = "장르 정보") + List genres, + + @Schema(description = "예약 시간 정보") + List showTicketingTimes +) { + + public static ShowPaginationApiParam from(ShowPaginationServiceResponse response) { + return ShowPaginationApiParam.builder() + .id(response.id()) + .title(response.title()) + .location(response.location()) + .posterImageURL(response.posterImageURL()) + .reservationAt(response.reservationAt()) + .hasTicketingOpenSchedule(response.hasTicketingOpenSchedule()) + .artists( + response.artists().stream() + .map(ShowArtistPaginationApiParam::from) + .toList() + ) + .genres( + response.genres().stream() + .map(ShowGenrePaginationApiParam::from) + .toList() + ) + .showTicketingTimes( + response.showTicketingTimes().stream() + .map(ShowTicketingTimePaginationApiParam::from) + .toList() + ) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiResponse.java deleted file mode 100644 index 9c08ffda..00000000 --- a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowPaginationApiResponse.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.example.show.controller.dto.response; - -import io.swagger.v3.oas.annotations.media.Schema; -import java.util.List; - -public record ShowPaginationApiResponse( - - @Schema(description = "공연 목록") - List shows, - - @Schema(description = "다음 페이지 존재 여부") - boolean hasNext -) { - -} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowSimpleApiResponse.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowSimpleApiResponse.java index be3f8767..4122a2f0 100644 --- a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowSimpleApiResponse.java +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowSimpleApiResponse.java @@ -1,30 +1,35 @@ package com.example.show.controller.dto.response; -import com.example.artist.controller.dto.response.ArtistSimpleApiResponse; -import com.example.genre.controller.dto.response.GenreSimpleApiResponse; import io.swagger.v3.oas.annotations.media.Schema; -import java.util.List; import java.util.UUID; +import lombok.Builder; +@Builder public record ShowSimpleApiResponse( @Schema(description = "공연 ID") UUID id, @Schema(description = "공연 이름") - String name, + String title, + + @Schema(description = "공연 장소") + String location, @Schema(description = "아티스트 정보") - ArtistSimpleApiResponse artist, + ShowArtistSimpleApiResponse artist, @Schema(description = "장르 정보") - GenreSimpleApiResponse genre, + ShowGenreSimpleApiResponse genre, + + @Schema(description = "공연 포스터 이미지 주소") + String posterImageURL, - @Schema(description = "티켓팅 정보 및 공연 날짜") - List ticketingAndShowInfo, + @Schema(description = "예매일") + String reservationDate, - @Schema(description = "공연 포스터 주소") - String posterImageURL + @Schema(description = "오픈 예정인 티켓팅 일정이 있는지 여부") + boolean hasTicketingOpenSchedule ) { } diff --git a/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowTicketingTimePaginationApiParam.java b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowTicketingTimePaginationApiParam.java new file mode 100644 index 00000000..7adf394e --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/dto/response/ShowTicketingTimePaginationApiParam.java @@ -0,0 +1,20 @@ +package com.example.show.controller.dto.response; + +import com.example.show.controller.vo.TicketingApiType; +import com.example.show.service.dto.response.ShowTicketingTimeServiceParam; +import lombok.Builder; +import org.example.util.DateTimeUtil; + +@Builder +public record ShowTicketingTimePaginationApiParam( + TicketingApiType ticketingType, + String ticketingAt +) { + + public static ShowTicketingTimePaginationApiParam from(ShowTicketingTimeServiceParam response) { + return ShowTicketingTimePaginationApiParam.builder() + .ticketingType(response.ticketingType()) + .ticketingAt(DateTimeUtil.formatLocalDateTime(response.ticketingAt())) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/controller/vo/ShowSortApiType.java b/app/api/show-api/src/main/java/com/example/show/controller/vo/ShowSortApiType.java new file mode 100644 index 00000000..d26284c2 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/controller/vo/ShowSortApiType.java @@ -0,0 +1,14 @@ +package com.example.show.controller.vo; + +import org.example.vo.ShowSortType; + +public enum ShowSortApiType { + RECENT, POPULAR; + + public ShowSortType toDomainType() { + return switch (this) { + case RECENT -> ShowSortType.RECENT; + case POPULAR -> ShowSortType.POPULAR; + }; + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java index 5495c185..074d0b21 100644 --- a/app/api/show-api/src/main/java/com/example/show/service/ShowService.java +++ b/app/api/show-api/src/main/java/com/example/show/service/ShowService.java @@ -2,8 +2,10 @@ import com.example.show.error.ShowError; import com.example.show.service.dto.param.ShowSearchPaginationServiceParam; +import com.example.show.service.dto.request.ShowPaginationServiceRequest; import com.example.show.service.dto.request.ShowSearchPaginationServiceRequest; import com.example.show.service.dto.response.ShowDetailServiceResponse; +import com.example.show.service.dto.response.ShowPaginationServiceResponse; import java.util.List; import java.util.NoSuchElementException; import java.util.UUID; @@ -43,4 +45,15 @@ public PaginationServiceResponse searchShow( return PaginationServiceResponse.of(data, response.hasNext()); } + public PaginationServiceResponse findShows(ShowPaginationServiceRequest request) { + var response = showUseCase.findShows(request.toDomainRequest()); + var data = response.data().stream() + .map(domainResponse -> ShowPaginationServiceResponse.from(domainResponse, request.now())) + .toList(); + + return PaginationServiceResponse.of( + data, + response.hasNext() + ); + } } diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/request/ShowPaginationServiceRequest.java b/app/api/show-api/src/main/java/com/example/show/service/dto/request/ShowPaginationServiceRequest.java new file mode 100644 index 00000000..231a4384 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/request/ShowPaginationServiceRequest.java @@ -0,0 +1,27 @@ +package com.example.show.service.dto.request; + +import com.example.show.controller.vo.ShowSortApiType; +import java.time.LocalDateTime; +import java.util.UUID; +import lombok.Builder; +import org.example.dto.show.request.ShowPaginationDomainRequest; + +@Builder +public record ShowPaginationServiceRequest( + ShowSortApiType sort, + boolean onlyOpenSchedule, + UUID cursor, + int size, + LocalDateTime now +) { + + public ShowPaginationDomainRequest toDomainRequest() { + return ShowPaginationDomainRequest.builder() + .sort(sort.toDomainType()) + .onlyOpenSchedule(onlyOpenSchedule) + .cursor(cursor) + .size(size) + .now(now) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowArtistSimpleServiceResponse.java b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowArtistSimpleServiceResponse.java new file mode 100644 index 00000000..15b6ba39 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowArtistSimpleServiceResponse.java @@ -0,0 +1,23 @@ +package com.example.show.service.dto.response; + +import java.util.UUID; +import lombok.Builder; +import org.example.dto.artist.response.ArtistDomainResponse; + +@Builder +public record ShowArtistSimpleServiceResponse( + UUID id, + String koreanName, + String englishName, + String image +) { + + public static ShowArtistSimpleServiceResponse from(ArtistDomainResponse response) { + return ShowArtistSimpleServiceResponse.builder() + .id(response.id()) + .koreanName(response.koreanName()) + .englishName(response.englishName()) + .image(response.image()) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowDetailServiceResponse.java b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowDetailServiceResponse.java index 5471a9df..72c48660 100644 --- a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowDetailServiceResponse.java +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowDetailServiceResponse.java @@ -38,7 +38,7 @@ public static ShowDetailServiceResponse from(ShowDetailDomainResponse show) { .map(ShowGenreServiceResponse::from) .toList() ) - .ticketingTimes(show.ticketingTimes().stream() + .ticketingTimes(show.showTicketingTimes().stream() .map(ShowTicketingTimeServiceResponse::from) .toList() ) diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowGenreSimpleServiceResponse.java b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowGenreSimpleServiceResponse.java new file mode 100644 index 00000000..1e327b36 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowGenreSimpleServiceResponse.java @@ -0,0 +1,19 @@ +package com.example.show.service.dto.response; + +import java.util.UUID; +import lombok.Builder; +import org.example.dto.genre.response.GenreDomainResponse; + +@Builder +public record ShowGenreSimpleServiceResponse( + UUID id, + String name +) { + + public static ShowGenreSimpleServiceResponse from(GenreDomainResponse genre) { + return ShowGenreSimpleServiceResponse.builder() + .id(genre.id()) + .name(genre.name()) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowPaginationServiceResponse.java b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowPaginationServiceResponse.java new file mode 100644 index 00000000..8f617296 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowPaginationServiceResponse.java @@ -0,0 +1,57 @@ +package com.example.show.service.dto.response; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Optional; +import java.util.UUID; +import lombok.Builder; +import org.example.dto.show.response.ShowDetailDomainResponse; +import org.example.util.DateTimeUtil; + +@Builder +public record ShowPaginationServiceResponse( + UUID id, + String title, + String location, + String posterImageURL, + String reservationAt, + boolean hasTicketingOpenSchedule, + List artists, + List genres, + List showTicketingTimes +) { + + public static ShowPaginationServiceResponse from(ShowDetailDomainResponse response, LocalDateTime now) { + List ticketingTimes = response.showTicketingTimes().stream() + .map(ShowTicketingTimeServiceParam::from) + .toList(); + + Optional optShowTicketingTime = ticketingTimes.stream() + .filter(ticketingTime -> now.isBefore(ticketingTime.ticketingAt())) + .findFirst(); + + String reservationAt = optShowTicketingTime.map( + showTicketingTime -> DateTimeUtil.formatLocalDateTime(showTicketingTime.ticketingAt()) + ).orElseGet(() -> ""); + + return ShowPaginationServiceResponse.builder() + .id(response.show().id()) + .title(response.show().title()) + .location(response.show().location()) + .posterImageURL(response.show().image()) + .reservationAt(reservationAt) + .hasTicketingOpenSchedule(now.isBefore(response.show().lastTicketingAt())) + .artists( + response.artists().stream() + .map(ShowArtistSimpleServiceResponse::from) + .toList() + ) + .genres( + response.genres().stream() + .map(ShowGenreSimpleServiceResponse::from) + .toList() + ) + .showTicketingTimes(ticketingTimes) + .build(); + } +} diff --git a/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowTicketingTimeServiceParam.java b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowTicketingTimeServiceParam.java new file mode 100644 index 00000000..f280b3b6 --- /dev/null +++ b/app/api/show-api/src/main/java/com/example/show/service/dto/response/ShowTicketingTimeServiceParam.java @@ -0,0 +1,20 @@ +package com.example.show.service.dto.response; + +import com.example.show.controller.vo.TicketingApiType; +import java.time.LocalDateTime; +import lombok.Builder; +import org.example.dto.show.response.ShowTicketingTimeDomainResponse; + +@Builder +public record ShowTicketingTimeServiceParam( + TicketingApiType ticketingType, + LocalDateTime ticketingAt +) { + + public static ShowTicketingTimeServiceParam from(ShowTicketingTimeDomainResponse response) { + return ShowTicketingTimeServiceParam.builder() + .ticketingType(TicketingApiType.from(response.ticketingType())) + .ticketingAt(response.ticketingAt()) + .build(); + } +} diff --git a/app/api/show-api/src/test/java/artist/fixture/dto/ArtistRequestDtoFixture.java b/app/api/show-api/src/test/java/artist/fixture/dto/ArtistRequestDtoFixture.java index d6872f6c..d36468ad 100644 --- a/app/api/show-api/src/test/java/artist/fixture/dto/ArtistRequestDtoFixture.java +++ b/app/api/show-api/src/test/java/artist/fixture/dto/ArtistRequestDtoFixture.java @@ -8,7 +8,7 @@ import com.example.artist.service.dto.request.ArtistUpdateServiceRequest; import com.example.artist.vo.ArtistApiType; import com.example.artist.vo.ArtistGenderApiType; -import com.example.artist.vo.ArtistSortStandardApiType; +import com.example.artist.vo.ArtistSortApiType; import com.example.vo.SubscriptionStatusApiType; import java.util.List; import java.util.UUID; @@ -53,7 +53,7 @@ public static ArtistSearchPaginationServiceRequest artistSearchPaginationService String search ) { return ArtistSearchPaginationServiceRequest.builder() - .sortStandard(ArtistSortStandardApiType.ENGLISH_NAME_ASC) + .sortStandard(ArtistSortApiType.ENGLISH_NAME_ASC) .cursor(UUID.randomUUID()) .size(size) .search(search) @@ -75,7 +75,7 @@ public static ArtistSubscriptionPaginationServiceRequest artistSubscriptionPagin return ArtistSubscriptionPaginationServiceRequest.builder() .subscriptionStatusApiType(SubscriptionStatusApiType.SUBSCRIBED) .size(size) - .sortStandard(ArtistSortStandardApiType.ENGLISH_NAME_ASC) + .sortStandard(ArtistSortApiType.ENGLISH_NAME_ASC) .cursor(UUID.randomUUID()) .userId(UUID.randomUUID()) .build(); @@ -86,7 +86,7 @@ public static ArtistUnsubscriptionPaginationServiceRequest artistUnsubscriptionP ) { return ArtistUnsubscriptionPaginationServiceRequest.builder() .subscriptionStatusApiType(SubscriptionStatusApiType.UNSUBSCRIBED) - .sortStandard(ArtistSortStandardApiType.ENGLISH_NAME_ASC) + .sortStandard(ArtistSortApiType.ENGLISH_NAME_ASC) .artistGenderApiTypes(getArtistGenderApiTypes()) .artistApiTypes(getArtistApiTypes()) .genreIds(List.of(UUID.randomUUID())) diff --git a/app/domain/common-domain/src/main/resources/application-domain-dev.yml b/app/domain/common-domain/src/main/resources/application-domain-dev.yml index 229aa8dd..9e1bbec4 100644 --- a/app/domain/common-domain/src/main/resources/application-domain-dev.yml +++ b/app/domain/common-domain/src/main/resources/application-domain-dev.yml @@ -19,5 +19,4 @@ spring: sql: init: - mode: always - platform: local \ No newline at end of file + mode: always \ No newline at end of file diff --git a/app/domain/common-domain/src/main/resources/application-domain-local.yml b/app/domain/common-domain/src/main/resources/application-domain-local.yml index 4ba58552..6991ebd6 100644 --- a/app/domain/common-domain/src/main/resources/application-domain-local.yml +++ b/app/domain/common-domain/src/main/resources/application-domain-local.yml @@ -1,12 +1,17 @@ spring: jpa: hibernate: - ddl-auto: create + ddl-auto: none show-sql: true open-in-view: false generate-ddl: true + defer-datasource-initialization: true properties: hibernate: format_sql: true highlight_sql: true use_sql_comments: true + + sql: + init: + mode: always diff --git a/app/domain/common-domain/src/main/resources/data.sql b/app/domain/common-domain/src/main/resources/data.sql index 4093d4ad..62110f89 100644 --- a/app/domain/common-domain/src/main/resources/data.sql +++ b/app/domain/common-domain/src/main/resources/data.sql @@ -28,7 +28,8 @@ VALUES ('017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1', '2024-08-04 00:00:00', '2024-08- '재즈'); -- 아티스트 데이터 -INSERT INTO public.artist (id, created_at, updated_at, is_deleted, korean_name, english_name, gender, +INSERT INTO public.artist (id, created_at, updated_at, is_deleted, korean_name, english_name, + gender, type, country, image) VALUES ('b9f79017-f97d-44b1-82ce-645e92856c0b', '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '콜드플레이', 'Coldplay', 'MAN', 'GROUP', 'UK', ''), @@ -205,509 +206,696 @@ VALUES ('b9f79017-f97d-44b1-82ce-645e92856c0b', '2024-08-04 00:00:00', '2024-08- -- Coldplay INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b9f79017-f97d-44b1-82ce-645e92856c0b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Post Malone INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec304557-e9f1-4bf3-8abf-62c83dec099f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Eve INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '977452b5-db8e-48b9-abe6-d06b44a1b4ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '977452b5-db8e-48b9-abe6-d06b44a1b4ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '977452b5-db8e-48b9-abe6-d06b44a1b4ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '977452b5-db8e-48b9-abe6-d06b44a1b4ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Spyair INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2ab7eba4-98f9-4936-ac1b-716bc2f04a1c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Ellegarden INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'dac4fda7-1746-4eb3-8b87-cab78ae86c75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- King Gnu INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Bruno Mars INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f56b52c1-72c2-450c-ad59-e88db1530dcb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Charlie Puth INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'a94dc17e-4b77-4959-bb1d-a3bd9735cf01', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'a94dc17e-4b77-4959-bb1d-a3bd9735cf01', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'a94dc17e-4b77-4959-bb1d-a3bd9735cf01', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'a94dc17e-4b77-4959-bb1d-a3bd9735cf01', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Taylor Swift INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0b60cd2a-5312-41a2-ba1d-db1acb72460b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0b60cd2a-5312-41a2-ba1d-db1acb72460b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0b60cd2a-5312-41a2-ba1d-db1acb72460b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0b60cd2a-5312-41a2-ba1d-db1acb72460b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- The Weeknd INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '02c9aedf-9ea2-4720-83c5-eeacd79a2e6e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '02c9aedf-9ea2-4720-83c5-eeacd79a2e6e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Justin Bieber INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c3df1fe2-0795-4204-92d6-68d3d6f4bc05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c3df1fe2-0795-4204-92d6-68d3d6f4bc05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c3df1fe2-0795-4204-92d6-68d3d6f4bc05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c3df1fe2-0795-4204-92d6-68d3d6f4bc05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Olivia Dean INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '7a97697e-2fa0-4d5b-851f-dd8864b5b49a', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '7a97697e-2fa0-4d5b-851f-dd8864b5b49a', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Sammy Virji INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'fdf9929d-9001-489a-9d7f-a345581ca6bd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'fdf9929d-9001-489a-9d7f-a345581ca6bd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Disclosure INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '1535086f-99ff-493e-bfb4-254f15d87e5d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d6'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '1535086f-99ff-493e-bfb4-254f15d87e5d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d6'); -- Radiohead INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f5d0d77a-e5f2-42ff-8478-5a70b3d7ba50', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f5d0d77a-e5f2-42ff-8478-5a70b3d7ba50', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f5d0d77a-e5f2-42ff-8478-5a70b3d7ba50', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f5d0d77a-e5f2-42ff-8478-5a70b3d7ba50', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- AJR INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e7bf557b-8591-418f-8422-d1f08c26df2f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e7bf557b-8591-418f-8422-d1f08c26df2f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e7bf557b-8591-418f-8422-d1f08c26df2f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e7bf557b-8591-418f-8422-d1f08c26df2f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Christopher INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e7f28490-8e4c-426b-92fc-fbcb226ea7f7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e7f28490-8e4c-426b-92fc-fbcb226ea7f7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- The Strokes INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b50a931a-d4f3-4c32-8636-253e4fff45ab', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b50a931a-d4f3-4c32-8636-253e4fff45ab', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b50a931a-d4f3-4c32-8636-253e4fff45ab', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b50a931a-d4f3-4c32-8636-253e4fff45ab', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Benson Boone INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '72cdcdb7-1fed-460d-a316-3988ffa1a6c8', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '72cdcdb7-1fed-460d-a316-3988ffa1a6c8', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Ariana Grande INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e86ca40e-29f3-48d3-921f-c51d5e8c05e0', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e86ca40e-29f3-48d3-921f-c51d5e8c05e0', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e86ca40e-29f3-48d3-921f-c51d5e8c05e0', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e86ca40e-29f3-48d3-921f-c51d5e8c05e0', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Conan Gray INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6d7fee98-4719-4afc-9113-42177e417cb8', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6d7fee98-4719-4afc-9113-42177e417cb8', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Maroon 5 INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ac400fd9-d188-4dfa-81a9-80d092317855', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Imagine Dragons INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '8c85815e-cd89-44cf-912d-d8c92a0ace60', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Yoasobi INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '1d6bd071-dd58-4411-988b-4a6146f59c80', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '1d6bd071-dd58-4411-988b-4a6146f59c80', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Lauv INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f5fc86ee-0519-409c-9bed-ae0dbead3bea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f5fc86ee-0519-409c-9bed-ae0dbead3bea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f5fc86ee-0519-409c-9bed-ae0dbead3bea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f5fc86ee-0519-409c-9bed-ae0dbead3bea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Lany INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'db8e5dbb-fc91-48d6-ba0f-0100004a64af', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'db8e5dbb-fc91-48d6-ba0f-0100004a64af', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'db8e5dbb-fc91-48d6-ba0f-0100004a64af', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'db8e5dbb-fc91-48d6-ba0f-0100004a64af', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Honne INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'de7b5c97-16d4-4d0b-bf52-b58f28b5475c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'de7b5c97-16d4-4d0b-bf52-b58f28b5475c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'de7b5c97-16d4-4d0b-bf52-b58f28b5475c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'de7b5c97-16d4-4d0b-bf52-b58f28b5475c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Noel Gallagher's High Flying Birds INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '059f8de8-e3f7-4e3b-a1da-89a8c4b73f70', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '059f8de8-e3f7-4e3b-a1da-89a8c4b73f70', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '059f8de8-e3f7-4e3b-a1da-89a8c4b73f70', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '059f8de8-e3f7-4e3b-a1da-89a8c4b73f70', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Green Day INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2c8afe0e-1c1b-4226-b20e-726faa1fc48c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2c8afe0e-1c1b-4226-b20e-726faa1fc48c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2c8afe0e-1c1b-4226-b20e-726faa1fc48c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2c8afe0e-1c1b-4226-b20e-726faa1fc48c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Måneskin INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b4e388ca-5a54-4e2e-8624-ddd363b32a75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b4e388ca-5a54-4e2e-8624-ddd363b32a75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b4e388ca-5a54-4e2e-8624-ddd363b32a75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b4e388ca-5a54-4e2e-8624-ddd363b32a75', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Yuuri INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e22c3c45-b88b-4278-b20d-270aac64229e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e22c3c45-b88b-4278-b20d-270aac64229e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e22c3c45-b88b-4278-b20d-270aac64229e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e22c3c45-b88b-4278-b20d-270aac64229e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Travis INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b6f220ab-34ad-40ee-b797-ec5c24459aa9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b6f220ab-34ad-40ee-b797-ec5c24459aa9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b6f220ab-34ad-40ee-b797-ec5c24459aa9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b6f220ab-34ad-40ee-b797-ec5c24459aa9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Mariah Carey INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'eb93b4ca-be7c-409f-b48d-5301ee0b02fe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); -- ZUTOMAYO INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '43e17c11-c3b7-4dd9-a92e-fdadb8783bca', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- ONE OK ROCK INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'fdc16095-1bb1-4cc6-8e2f-75495a6f3a13', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'fdc16095-1bb1-4cc6-8e2f-75495a6f3a13', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'fdc16095-1bb1-4cc6-8e2f-75495a6f3a13', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'fdc16095-1bb1-4cc6-8e2f-75495a6f3a13', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- New Hope Club INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2f8c8f6c-842a-48cd-9ed7-f84710d3fef2', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Michael Bublé INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6b1aeec8-ac19-4a6a-92b5-5e71733ef204', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6b1aeec8-ac19-4a6a-92b5-5e71733ef204', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6b1aeec8-ac19-4a6a-92b5-5e71733ef204', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6b1aeec8-ac19-4a6a-92b5-5e71733ef204', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'); -- Justin Timberlake INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2e277ef0-c3f1-4f80-9ed0-4db0a3350e12', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2e277ef0-c3f1-4f80-9ed0-4db0a3350e12', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2e277ef0-c3f1-4f80-9ed0-4db0a3350e12', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2e277ef0-c3f1-4f80-9ed0-4db0a3350e12', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Wanima INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e0fc0ab6-19ee-47ef-a50d-45ab7efe3bba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Fujii Kaze INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '772efb86-0af8-4dc6-b73b-bd226fb86944', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Reol INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '268ad7b1-7550-4cab-bb04-273b1649e682', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d7'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '268ad7b1-7550-4cab-bb04-273b1649e682', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '268ad7b1-7550-4cab-bb04-273b1649e682', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d7'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '268ad7b1-7550-4cab-bb04-273b1649e682', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Jungle INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e3753ac5-a079-417a-b75a-7593d9b802ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e3753ac5-a079-417a-b75a-7593d9b802ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Nothing But Thieves INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '5aeb15be-b150-4915-a242-d35cdee8aeb4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '5aeb15be-b150-4915-a242-d35cdee8aeb4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '5aeb15be-b150-4915-a242-d35cdee8aeb4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '5aeb15be-b150-4915-a242-d35cdee8aeb4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Jacob Collier INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '01681324-678a-4e9a-a80b-e93d038bf75f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '01681324-678a-4e9a-a80b-e93d038bf75f', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'); -- Noel Gallagher INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '587d14a8-dc16-47b1-8788-b1860076cbdb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '587d14a8-dc16-47b1-8788-b1860076cbdb', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Lana Del Rey INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '17790b8d-4e2c-4ec5-a524-d00d80a9868e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '17790b8d-4e2c-4ec5-a524-d00d80a9868e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '17790b8d-4e2c-4ec5-a524-d00d80a9868e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '17790b8d-4e2c-4ec5-a524-d00d80a9868e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Oneohtrix Point Never INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '88ade2ad-96ac-4ed4-8dce-72aec8d8545d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '88ade2ad-96ac-4ed4-8dce-72aec8d8545d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Coco & Clair Clair INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c440d4e0-3f52-4225-9bc2-f1183a4b9f22', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c440d4e0-3f52-4225-9bc2-f1183a4b9f22', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Cookiee Kawaii INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '036854c0-9d22-4660-89f9-0abd16dd3ec1', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '036854c0-9d22-4660-89f9-0abd16dd3ec1', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- King Krule INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876dd'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e139192f-ba01-4a15-b0b1-86005aee3c1d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); -- Kendrick Lamar INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd63490e9-0eaf-4914-be90-8d34381b5b05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd63490e9-0eaf-4914-be90-8d34381b5b05', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); -- Official Hige Dandism INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '56a4a4af-dc3f-4f9f-9316-6bcd20d99455', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Vaundy INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '687f2125-f72e-45c9-84cc-3181fa5af912', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '687f2125-f72e-45c9-84cc-3181fa5af912', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '687f2125-f72e-45c9-84cc-3181fa5af912', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '687f2125-f72e-45c9-84cc-3181fa5af912', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'); -- Natori INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '909593a3-d067-4dae-9b4a-e14c8accb1aa', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '909593a3-d067-4dae-9b4a-e14c8accb1aa', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Ado INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '10c0c327-8053-4792-ae0b-413d337ec413', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '10c0c327-8053-4792-ae0b-413d337ec413', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Wanuka INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'e19d1403-c4b3-4a6f-b5b8-8e935cb645c4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'e19d1403-c4b3-4a6f-b5b8-8e935cb645c4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Kenshi Yonezu INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '80154f71-f7b6-4d06-be39-2e4e00b281a1', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '80154f71-f7b6-4d06-be39-2e4e00b281a1', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Imase INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '4fd6cc98-3e3a-42bf-b04d-1563335397ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '4fd6cc98-3e3a-42bf-b04d-1563335397ad', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- LiSA INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c89e680f-1f9a-41a0-bc35-b835e67dcace', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c89e680f-1f9a-41a0-bc35-b835e67dcace', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c89e680f-1f9a-41a0-bc35-b835e67dcace', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c89e680f-1f9a-41a0-bc35-b835e67dcace', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Aimyon INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2f3532d6-f6f6-4b34-950f-7e4fc701e009', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2f3532d6-f6f6-4b34-950f-7e4fc701e009', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2f3532d6-f6f6-4b34-950f-7e4fc701e009', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2f3532d6-f6f6-4b34-950f-7e4fc701e009', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Aimer INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'f636f96a-7a42-416b-bab8-1cb8e1d2c314', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'f636f96a-7a42-416b-bab8-1cb8e1d2c314', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Tuki. INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'c62a2a56-1723-44f2-abb2-7a344db06afe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'c62a2a56-1723-44f2-abb2-7a344db06afe', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Hitsujibungaku INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '6342db02-e3ee-494b-91f0-15ba144b906c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Millennium Parade INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d2'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'ec82d1dd-7eb7-4801-bd44-86d6096e4dea', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Yama INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '5adeac70-0723-4869-831c-aace7691412c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '5adeac70-0723-4869-831c-aace7691412c', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- RADWIMPS INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0dcf43ed-2a0c-4a54-af53-40eaa5c33776', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Yorushika INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '340cb74f-c770-43ce-91af-88cd2eff23d9', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Mrs. Green Apple INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '45c6e260-0ac1-4786-831f-7b077d8192e5', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Billie Eilish INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd187b6a2-4923-4611-bfff-f9c4c986566e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'd187b6a2-4923-4611-bfff-f9c4c986566e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd187b6a2-4923-4611-bfff-f9c4c986566e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'd187b6a2-4923-4611-bfff-f9c4c986566e', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Michael Bolton INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '5a4db81d-16e8-4033-8198-09bc92f57ca4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '5a4db81d-16e8-4033-8198-09bc92f57ca4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '5a4db81d-16e8-4033-8198-09bc92f57ca4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '5a4db81d-16e8-4033-8198-09bc92f57ca4', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Dua Lipa INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '3a2d52b1-b39f-4389-b1ee-a0fc0c38bc62', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '3a2d52b1-b39f-4389-b1ee-a0fc0c38bc62', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Red Hot Chili Peppers INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '9431dc41-7ce6-4d81-b680-a322595fe43d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '9431dc41-7ce6-4d81-b680-a322595fe43d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '9431dc41-7ce6-4d81-b680-a322595fe43d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '9431dc41-7ce6-4d81-b680-a322595fe43d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Adele INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0d38c2cd-0be8-49b5-a719-b17db10afe84', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '0d38c2cd-0be8-49b5-a719-b17db10afe84', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0d38c2cd-0be8-49b5-a719-b17db10afe84', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '0d38c2cd-0be8-49b5-a719-b17db10afe84', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d9'); -- Ed Sheeran INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '8996c8dc-b8a2-449b-9c19-09cd49e2924d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '8996c8dc-b8a2-449b-9c19-09cd49e2924d', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Lady Gaga INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '2204c6fa-c78d-420f-b689-b8932aaf50a7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '2204c6fa-c78d-420f-b689-b8932aaf50a7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Def Leppard INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876db'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876db'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '82311401-6764-44bd-9fb4-a2bb37a89cfd', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- AC/DC INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876db'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876db'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '7b3acbb2-6d90-4bc0-a510-95688ffbdbc7', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d1'); -- Yonige INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'aa4e4067-11cc-46f5-9548-5ebdc40b91a3', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'aa4e4067-11cc-46f5-9548-5ebdc40b91a3', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'aa4e4067-11cc-46f5-9548-5ebdc40b91a3', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'aa4e4067-11cc-46f5-9548-5ebdc40b91a3', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Ryokuoushoku Shakai INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '87228380-e581-46d9-b524-869360451d02', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '87228380-e581-46d9-b524-869360451d02', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '87228380-e581-46d9-b524-869360451d02', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '87228380-e581-46d9-b524-869360451d02', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3'); -- Stevie Wonder INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '3d367630-37a4-41be-8d09-4434e4c24d09', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '3d367630-37a4-41be-8d09-4434e4c24d09', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Gen Hoshino INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '967573c3-fcee-453a-b9ee-177359ff7dba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '967573c3-fcee-453a-b9ee-177359ff7dba', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Creepy Nuts INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '525c7aec-3c72-45c9-9e53-f904869b1306', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '525c7aec-3c72-45c9-9e53-f904869b1306', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); -- Miley Cyrus INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, 'b71a2ee4-a110-4e6c-a49c-e135a8311b6b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + 'b71a2ee4-a110-4e6c-a49c-e135a8311b6b', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); -- Vacations INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '1aab6fed-7d20-42ed-9f59-67713671f813', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'); - --- Sakanaction -INSERT INTO public.artist_genre (id, created_at, updated_at, is_deleted, artist_id, genre_id) -VALUES - (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, '129fb608-eeb9-42ec-87f6-e1515bdf2696', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); - - - - +VALUES (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '1aab6fed-7d20-42ed-9f59-67713671f813', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d5'), + (gen_random_uuid(), '2024-08-04 00:00:00', '2024-08-04 00:00:00', false, + '129fb608-eeb9-42ec-87f6-e1515bdf2696', '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d4'); + +-- ArtistSearch + +INSERT INTO artist_search (id, created_at, updated_at, is_deleted, name, artist_id) +VALUES (gen_random_uuid(), + now(), + now(), + False, + '콜드플레이', + 'b9f79017-f97d-44b1-82ce-645e92856c0b'), + (gen_random_uuid(), + now(), + now(), + False, + 'coldplay', + 'b9f79017-f97d-44b1-82ce-645e92856c0b'), + (gen_random_uuid(), + now(), + now(), + False, + '포스트말론', + 'ec304557-e9f1-4bf3-8abf-62c83dec099f'), + (gen_random_uuid(), + now(), + now(), + False, + 'postmalone', + 'ec304557-e9f1-4bf3-8abf-62c83dec099f'), + (gen_random_uuid(), + now(), + now(), + False, + '이브', + '977452b5-db8e-48b9-abe6-d06b44a1b4ad'), + (gen_random_uuid(), + now(), + now(), + False, + 'eve', + '977452b5-db8e-48b9-abe6-d06b44a1b4ad'), + (gen_random_uuid(), + now(), + now(), + False, + '브루노마스', + 'f56b52c1-72c2-450c-ad59-e88db1530dcb'), + (gen_random_uuid(), + now(), + now(), + False, + 'brunomars', + 'f56b52c1-72c2-450c-ad59-e88db1530dcb'), + (gen_random_uuid(), + now(), + now(), + False, + '킹누', + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6'), + (gen_random_uuid(), + now(), + now(), + False, + 'kinggnu', + 'd3fc15e6-172f-4448-928b-7fdd7a6a9ab6'); + +-- Show +INSERT INTO show(id, created_at, updated_at, is_deleted, title, content, start_date, end_date, + location, image, last_ticketing_at, seat_prices, ticketing_sites) +VALUES ('eca21e50-1392-4059-b380-061a2323c6d2', + now(), + now(), + false, + '공연제목', + '공연내용', + now(), + now(), + '공연장 위치', + 'https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg', + now(), + '{"b": 20000, "c": 30000}', + '{"티켓링크": "https://naver.com"}'); + +-- Show Artist +INSERT INTO show_artist (id, created_at, updated_at, is_deleted, show_id, artist_id) +VALUES ( + gen_random_uuid(), + now(), + now(), + false, + 'eca21e50-1392-4059-b380-061a2323c6d2', + 'b9f79017-f97d-44b1-82ce-645e92856c0b' + ); + +-- Show Genre +INSERT INTO show_genre (id, created_at, updated_at, is_deleted, show_id, genre_id) +VALUES ( + gen_random_uuid(), + now(), + now(), + false, + 'eca21e50-1392-4059-b380-061a2323c6d2', + '017f20d0-4f3c-8f4d-9e15-7ff0c3a876d3' + ); + +INSERT INTO show_ticketing_time (id, created_at, updated_at, is_deleted, type, ticketing_at, show_id) +VALUES ( + gen_random_uuid(), + now(), + now(), + false, + 'PRE', + now(), + 'eca21e50-1392-4059-b380-061a2323c6d2' + ); \ No newline at end of file diff --git a/app/domain/common-domain/src/main/resources/schema.sql b/app/domain/common-domain/src/main/resources/schema.sql index 185dbc64..c4c14cce 100644 --- a/app/domain/common-domain/src/main/resources/schema.sql +++ b/app/domain/common-domain/src/main/resources/schema.sql @@ -120,18 +120,19 @@ create table interest_show create table show ( - id uuid not null, - created_at timestamp(6) not null, - updated_at timestamp(6) not null, - is_deleted boolean not null, - start_date date not null, - end_date date not null, - title varchar(255) not null, - content varchar(255) not null, - location varchar(255) not null, - image varchar(255) not null, - seat_price jsonb not null, - ticketing jsonb not null, + id uuid not null, + created_at timestamp(6) not null, + updated_at timestamp(6) not null, + is_deleted boolean not null, + start_date date not null, + end_date date not null, + title varchar(255) not null, + content varchar(255) not null, + location varchar(255) not null, + image varchar(255) not null, + last_ticketing_at timestamp(6) not null, + seat_prices jsonb not null, + ticketing_sites jsonb not null, primary key (id) ); diff --git a/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistPaginationDomainRequest.java b/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistPaginationDomainRequest.java index ebcc6e94..ccf4bfb8 100644 --- a/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistPaginationDomainRequest.java +++ b/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistPaginationDomainRequest.java @@ -3,14 +3,14 @@ import java.util.List; import java.util.UUID; import lombok.Builder; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.example.vo.SubscriptionStatus; @Builder public record ArtistPaginationDomainRequest( SubscriptionStatus subscriptionStatus, int size, - ArtistSortStandardDomainType sortStandard, + ArtistSortType sortStandard, UUID cursor, List artistIds, ArtistFilterDomain artistFilterDomain diff --git a/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistSearchPaginationDomainRequest.java b/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistSearchPaginationDomainRequest.java index f6ff0dd4..5aaff58e 100644 --- a/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistSearchPaginationDomainRequest.java +++ b/app/domain/show-domain/src/main/java/org/example/dto/artist/request/ArtistSearchPaginationDomainRequest.java @@ -2,12 +2,12 @@ import java.util.UUID; import lombok.Builder; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; @Builder public record ArtistSearchPaginationDomainRequest( - ArtistSortStandardDomainType sortStandard, + ArtistSortType sortStandard, UUID cursor, int size, String search diff --git a/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowCreationDomainRequest.java b/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowCreationDomainRequest.java index 572810ef..551f0b3d 100644 --- a/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowCreationDomainRequest.java +++ b/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowCreationDomainRequest.java @@ -32,6 +32,7 @@ public Show toShow() { .endDate(endDate) .location(location) .image(posterImageURL) + .lastTicketingAt(showTicketingTimes.getLastTicketingDateTime()) .seatPrices(showSeats) .ticketingSites(showTicketingSites) .build(); diff --git a/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowPaginationDomainRequest.java b/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowPaginationDomainRequest.java new file mode 100644 index 00000000..fe24b004 --- /dev/null +++ b/app/domain/show-domain/src/main/java/org/example/dto/show/request/ShowPaginationDomainRequest.java @@ -0,0 +1,17 @@ +package org.example.dto.show.request; + +import java.time.LocalDateTime; +import java.util.UUID; +import lombok.Builder; +import org.example.vo.ShowSortType; + +@Builder +public record ShowPaginationDomainRequest( + ShowSortType sort, + boolean onlyOpenSchedule, + UUID cursor, + int size, + LocalDateTime now +) { + +} diff --git a/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDetailDomainResponse.java b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDetailDomainResponse.java index 0435a17e..6fd4df85 100644 --- a/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDetailDomainResponse.java +++ b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDetailDomainResponse.java @@ -8,7 +8,7 @@ public record ShowDetailDomainResponse( ShowDomainResponse show, Set artists, Set genres, - Set ticketingTimes + Set showTicketingTimes ) { } diff --git a/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDomainResponse.java b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDomainResponse.java index 94c96535..61692659 100644 --- a/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDomainResponse.java +++ b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowDomainResponse.java @@ -1,6 +1,7 @@ package org.example.dto.show.response; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.UUID; import org.example.entity.show.info.SeatPrices; import org.example.entity.show.info.TicketingSites; @@ -16,6 +17,7 @@ public record ShowDomainResponse( LocalDate endDate, String location, String image, + LocalDateTime lastTicketingAt, SeatPrices seatPrices, TicketingSites ticketingSites ) { diff --git a/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowPaginationDomainResponse.java b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowPaginationDomainResponse.java new file mode 100644 index 00000000..a5cdee71 --- /dev/null +++ b/app/domain/show-domain/src/main/java/org/example/dto/show/response/ShowPaginationDomainResponse.java @@ -0,0 +1,12 @@ +package org.example.dto.show.response; + +import java.util.List; +import lombok.Builder; + +@Builder +public record ShowPaginationDomainResponse( + boolean hasNext, + List data +) { + +} diff --git a/app/domain/show-domain/src/main/java/org/example/entity/show/Show.java b/app/domain/show-domain/src/main/java/org/example/entity/show/Show.java index adf3f534..5f887682 100644 --- a/app/domain/show-domain/src/main/java/org/example/entity/show/Show.java +++ b/app/domain/show-domain/src/main/java/org/example/entity/show/Show.java @@ -5,6 +5,7 @@ import jakarta.persistence.Enumerated; import jakarta.persistence.Table; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; import java.util.UUID; import lombok.AccessLevel; @@ -41,6 +42,9 @@ public class Show extends BaseEntity { @Column(name = "image", nullable = false) private String image; + @Column(name = "last_ticketing_at", nullable = false) + private LocalDateTime lastTicketingAt; + @Enumerated private SeatPrices seatPrices; @@ -55,6 +59,7 @@ private Show( LocalDate endDate, String location, String image, + LocalDateTime lastTicketingAt, SeatPrices seatPrices, TicketingSites ticketingSites ) { @@ -64,6 +69,7 @@ private Show( this.endDate = endDate; this.location = location; this.image = image; + this.lastTicketingAt = lastTicketingAt; this.seatPrices = seatPrices; this.ticketingSites = ticketingSites; } @@ -106,7 +112,6 @@ public ShowSearch toShowSearch() { .build(); } - public void changeShowInfo(Show newShow) { this.title = newShow.title; this.content = newShow.content; diff --git a/app/domain/show-domain/src/main/java/org/example/entity/show/ShowTicketingTime.java b/app/domain/show-domain/src/main/java/org/example/entity/show/ShowTicketingTime.java index 5f3663e3..e8d83697 100644 --- a/app/domain/show-domain/src/main/java/org/example/entity/show/ShowTicketingTime.java +++ b/app/domain/show-domain/src/main/java/org/example/entity/show/ShowTicketingTime.java @@ -24,7 +24,7 @@ public class ShowTicketingTime extends BaseEntity { @Column(name = "type", nullable = false) - @Enumerated(EnumType.STRING) + @Enumerated(value = EnumType.STRING) private TicketingType ticketingType; @Column(name = "ticketing_at", nullable = false) diff --git a/app/domain/show-domain/src/main/java/org/example/entity/show/info/SeatPrices.java b/app/domain/show-domain/src/main/java/org/example/entity/show/info/SeatPrices.java index 3c72471a..2deff94b 100644 --- a/app/domain/show-domain/src/main/java/org/example/entity/show/info/SeatPrices.java +++ b/app/domain/show-domain/src/main/java/org/example/entity/show/info/SeatPrices.java @@ -13,7 +13,7 @@ public class SeatPrices { @Type(JsonType.class) - @Column(name = "seat_price", columnDefinition = "jsonb", nullable = false) + @Column(name = "seat_prices", columnDefinition = "jsonb", nullable = false) private Map priceBySeat = new HashMap<>(); public void savePriceInformation(String seatType, Integer price) { diff --git a/app/domain/show-domain/src/main/java/org/example/entity/show/info/ShowTicketingTimes.java b/app/domain/show-domain/src/main/java/org/example/entity/show/info/ShowTicketingTimes.java index 80781a71..4d16d37d 100644 --- a/app/domain/show-domain/src/main/java/org/example/entity/show/info/ShowTicketingTimes.java +++ b/app/domain/show-domain/src/main/java/org/example/entity/show/info/ShowTicketingTimes.java @@ -3,6 +3,7 @@ import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; +import java.util.NoSuchElementException; import org.example.vo.TicketingType; public class ShowTicketingTimes { @@ -16,4 +17,10 @@ public void saveTicketingTimes(TicketingType ticketingType, LocalDateTime date) public Map getTicketingTimeByType() { return new HashMap<>(ticketingTimeByType); } + + public LocalDateTime getLastTicketingDateTime() { + return ticketingTimeByType.values().stream() + .max(LocalDateTime::compareTo) + .orElseThrow(NoSuchElementException::new); + } } diff --git a/app/domain/show-domain/src/main/java/org/example/entity/show/info/TicketingSites.java b/app/domain/show-domain/src/main/java/org/example/entity/show/info/TicketingSites.java index 19f6113e..aa7c1e9d 100644 --- a/app/domain/show-domain/src/main/java/org/example/entity/show/info/TicketingSites.java +++ b/app/domain/show-domain/src/main/java/org/example/entity/show/info/TicketingSites.java @@ -13,7 +13,7 @@ public class TicketingSites { @Type(JsonType.class) - @Column(name = "ticketing", columnDefinition = "jsonb", nullable = false) + @Column(name = "ticketing_sites", columnDefinition = "jsonb", nullable = false) private Map ticketingURLBySite = new HashMap<>(); public void saveTicketingSite(String ticketingSite, String ticketingURL) { diff --git a/app/domain/show-domain/src/main/java/org/example/repository/artist/ArtistQuerydslRepositoryImpl.java b/app/domain/show-domain/src/main/java/org/example/repository/artist/ArtistQuerydslRepositoryImpl.java index 60cbbb0e..91650cb0 100644 --- a/app/domain/show-domain/src/main/java/org/example/repository/artist/ArtistQuerydslRepositoryImpl.java +++ b/app/domain/show-domain/src/main/java/org/example/repository/artist/ArtistQuerydslRepositoryImpl.java @@ -29,7 +29,7 @@ import org.example.dto.artist.response.ArtistSimpleDomainResponse; import org.example.entity.artist.Artist; import org.example.util.SliceUtil; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.example.vo.SubscriptionStatus; import org.springframework.data.domain.Slice; import org.springframework.stereotype.Repository; @@ -227,7 +227,7 @@ private void addConditionIfNotEmpty( } } - private OrderSpecifier getOrderSpecifier(ArtistSortStandardDomainType type) { + private OrderSpecifier getOrderSpecifier(ArtistSortType type) { return switch (type) { case KOREAN_NAME_ASC -> artist.koreanName.asc(); case KOREAN_NAME_DESC -> artist.koreanName.desc(); diff --git a/app/domain/show-domain/src/main/java/org/example/repository/artist/artistsearch/ArtistSearchQuerydslRepositoryImpl.java b/app/domain/show-domain/src/main/java/org/example/repository/artist/artistsearch/ArtistSearchQuerydslRepositoryImpl.java index 053f983a..0b2596da 100644 --- a/app/domain/show-domain/src/main/java/org/example/repository/artist/artistsearch/ArtistSearchQuerydslRepositoryImpl.java +++ b/app/domain/show-domain/src/main/java/org/example/repository/artist/artistsearch/ArtistSearchQuerydslRepositoryImpl.java @@ -15,7 +15,7 @@ import org.example.dto.artist.response.ArtistPaginationDomainResponse; import org.example.dto.artist.response.ArtistSimpleDomainResponse; import org.example.util.SliceUtil; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.springframework.data.domain.Slice; import org.springframework.stereotype.Repository; @@ -61,7 +61,7 @@ private Predicate getDefaultPredicateInCursorPagination(UUID cursor) { return cursor == null ? defaultPredicate : artist.id.gt(cursor).and(defaultPredicate); } - private OrderSpecifier getOrderSpecifier(ArtistSortStandardDomainType type) { + private OrderSpecifier getOrderSpecifier(ArtistSortType type) { return switch (type) { case KOREAN_NAME_ASC -> artist.koreanName.asc(); case KOREAN_NAME_DESC -> artist.koreanName.desc(); diff --git a/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepository.java b/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepository.java index cc951037..39b3dbf9 100644 --- a/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepository.java +++ b/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepository.java @@ -3,8 +3,10 @@ import java.util.List; import java.util.Optional; import java.util.UUID; +import org.example.dto.show.request.ShowPaginationDomainRequest; import org.example.dto.show.response.ShowDetailDomainResponse; import org.example.dto.show.response.ShowInfoDomainResponse; +import org.example.dto.show.response.ShowPaginationDomainResponse; import org.example.dto.show.response.ShowWithTicketingTimesDomainResponse; public interface ShowQuerydslRepository { @@ -13,5 +15,7 @@ public interface ShowQuerydslRepository { List findShowDetailWithTicketingTimes(); + ShowPaginationDomainResponse findShows(ShowPaginationDomainRequest request); + Optional findShowInfoById(UUID id); } diff --git a/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepositoryImpl.java b/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepositoryImpl.java index f025df6c..3930ea19 100644 --- a/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepositoryImpl.java +++ b/app/domain/show-domain/src/main/java/org/example/repository/show/ShowQuerydslRepositoryImpl.java @@ -10,6 +10,8 @@ import static org.example.entity.show.QShowGenre.showGenre; import static org.example.entity.show.QShowTicketingTime.showTicketingTime; +import com.querydsl.core.types.ConstructorExpression; +import com.querydsl.core.types.OrderSpecifier; import com.querydsl.core.types.Projections; import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQuery; @@ -22,12 +24,17 @@ import org.example.dto.artist.response.ArtistKoreanNameDomainResponse; import org.example.dto.genre.response.GenreDomainResponse; import org.example.dto.genre.response.GenreNameDomainResponse; +import org.example.dto.show.request.ShowPaginationDomainRequest; import org.example.dto.show.response.ShowDetailDomainResponse; import org.example.dto.show.response.ShowDomainResponse; import org.example.dto.show.response.ShowInfoDomainResponse; +import org.example.dto.show.response.ShowPaginationDomainResponse; import org.example.dto.show.response.ShowTicketingTimeDomainResponse; import org.example.dto.show.response.ShowWithTicketingTimesDomainResponse; import org.example.entity.show.Show; +import org.example.util.SliceUtil; +import org.example.vo.ShowSortType; +import org.springframework.data.domain.Slice; import org.springframework.stereotype.Repository; @Repository @@ -42,49 +49,7 @@ public Optional findShowDetailById(UUID id) { createShowJoinArtistAndGenreQuery() .where(show.id.eq(id)) .transform( - groupBy(show.id).as( - Projections.constructor( - ShowDetailDomainResponse.class, - Projections.constructor( - ShowDomainResponse.class, - show.id, - show.title, - show.content, - show.startDate, - show.endDate, - show.location, - show.image, - show.seatPrices, - show.ticketingSites - ), - set( - Projections.constructor( - ArtistDomainResponse.class, - artist.id, - artist.koreanName, - artist.englishName, - artist.image, - artist.country, - artist.artistGender, - artist.artistType - ) - ), - set( - Projections.constructor( - GenreDomainResponse.class, - genre.id, - genre.name - ) - ), - set( - Projections.constructor( - ShowTicketingTimeDomainResponse.class, - showTicketingTime.ticketingType, - showTicketingTime.ticketingAt - ) - ) - ) - ) + groupBy(show.id).as(getShowDetailConstructor()) ) .get(id) ); @@ -108,6 +73,7 @@ public List findShowDetailWithTicketingTim show.endDate, show.location, show.image, + show.lastTicketingAt, show.seatPrices, show.ticketingSites ), @@ -129,49 +95,123 @@ public Optional findShowInfoById(UUID id) { createShowJoinArtistAndGenreQuery() .where(show.id.eq(id)) .transform( - groupBy(show.id).as( - Projections.constructor( - ShowInfoDomainResponse.class, - Projections.constructor( - ShowDomainResponse.class, - show.id, - show.title, - show.content, - show.startDate, - show.endDate, - show.location, - show.image, - show.seatPrices, - show.ticketingSites - ), - set( - Projections.constructor( - ArtistKoreanNameDomainResponse.class, - artist.id, - artist.koreanName - ) - ), - set( - Projections.constructor( - GenreNameDomainResponse.class, - genre.id, - genre.name - ) - ), - set( - Projections.constructor( - ShowTicketingTimeDomainResponse.class, - showTicketingTime.ticketingType, - showTicketingTime.ticketingAt - ) - ) - ) - ) + groupBy(show.id).as(getShowInfoConstructor()) ) .get(id) ); } + @Override + public ShowPaginationDomainResponse findShows(ShowPaginationDomainRequest request) { + List data = jpaQueryFactory + .selectFrom(show) + .join(showArtist).on(isShowArtistEqualShowIdAndIsDeletedFalse()) + .join(artist).on(isArtistIdEqualShowArtistAndIsDeletedFalse()) + .join(showGenre).on(isShowGenreEqualShowIdAndIsDeletedFalse()) + .join(genre).on(isGenreIdEqualShowGenreAndIsDeletedFalse()) + .join(showTicketingTime) + .on(showTicketingTime.show.id.eq(show.id).and(showTicketingTime.isDeleted.isFalse())) + .where(getShowPaginationWhereCondition(request)) + .limit(request.size() + 1) + .orderBy(getShowOrderSpecifier(request.sort())) + .transform( + groupBy(show.id).as(getShowDetailConstructor()) + ).values().stream() + .toList(); + + Slice slice = SliceUtil.makeSlice(request.size(), data); + + return ShowPaginationDomainResponse.builder() + .data(slice.getContent()) + .hasNext(slice.hasNext()) + .build(); + } + + private ConstructorExpression getShowDetailConstructor() { + return Projections.constructor( + ShowDetailDomainResponse.class, + Projections.constructor( + ShowDomainResponse.class, + show.id, + show.title, + show.content, + show.startDate, + show.endDate, + show.location, + show.image, + show.lastTicketingAt, + show.seatPrices, + show.ticketingSites + ), + set( + Projections.constructor( + ArtistDomainResponse.class, + artist.id, + artist.koreanName, + artist.englishName, + artist.image, + artist.country, + artist.artistGender, + artist.artistType + ) + ), + set( + Projections.constructor( + GenreDomainResponse.class, + genre.id, + genre.name + ) + ), + set( + Projections.constructor( + ShowTicketingTimeDomainResponse.class, + showTicketingTime.ticketingType, + showTicketingTime.ticketingAt + ) + ) + ); + } + + private ConstructorExpression getShowInfoConstructor() { + return Projections.constructor( + ShowInfoDomainResponse.class, + Projections.constructor( + ShowDomainResponse.class, + show.id, + show.title, + show.content, + show.startDate, + show.endDate, + show.location, + show.image, + show.lastTicketingAt, + show.seatPrices, + show.ticketingSites + ), + set( + Projections.constructor( + ArtistKoreanNameDomainResponse.class, + artist.id, + artist.koreanName + ) + ), + set( + Projections.constructor( + GenreNameDomainResponse.class, + genre.id, + genre.name + ) + ), + set( + Projections.constructor( + ShowTicketingTimeDomainResponse.class, + showTicketingTime.ticketingType, + showTicketingTime.ticketingAt + ) + ) + ); + } + private JPAQuery createShowJoinArtistAndGenreQuery() { return jpaQueryFactory .selectFrom(show) @@ -203,4 +243,27 @@ private BooleanExpression isShowTicketingEqualShowAndIsDeletedFalse() { return showTicketingTime.show.id.eq(show.id).and(showTicketingTime.isDeleted.isFalse()); } + private BooleanExpression getShowPaginationWhereCondition(ShowPaginationDomainRequest request) { + BooleanExpression defaultCondition = show.isDeleted.isFalse(); + + if (request.cursor() != null) { + defaultCondition.and(show.id.gt(request.cursor())); + } + + // 티켓팅 오픈 예정 스케줄이 있는 경우 + // TODO: 이름 변경이 필요해 보임 + if (request.onlyOpenSchedule()) { + defaultCondition.and(show.lastTicketingAt.after(request.now())); + } + + return defaultCondition; + } + + // TODO: Show 조회수 컬럼 추가 후 수정 + private OrderSpecifier getShowOrderSpecifier(ShowSortType sortType) { + return switch (sortType) { + case RECENT -> show.lastTicketingAt.desc(); + case POPULAR -> show.id.desc(); + }; + } } diff --git a/app/domain/show-domain/src/main/java/org/example/usecase/show/ShowUseCase.java b/app/domain/show-domain/src/main/java/org/example/usecase/show/ShowUseCase.java index 8e7162e0..b4d33d5d 100644 --- a/app/domain/show-domain/src/main/java/org/example/usecase/show/ShowUseCase.java +++ b/app/domain/show-domain/src/main/java/org/example/usecase/show/ShowUseCase.java @@ -5,10 +5,12 @@ import java.util.UUID; import lombok.RequiredArgsConstructor; import org.example.dto.show.request.ShowCreationDomainRequest; +import org.example.dto.show.request.ShowPaginationDomainRequest; import org.example.dto.show.request.ShowSearchPaginationDomainRequest; import org.example.dto.show.request.ShowUpdateDomainRequest; import org.example.dto.show.response.ShowDetailDomainResponse; import org.example.dto.show.response.ShowInfoDomainResponse; +import org.example.dto.show.response.ShowPaginationDomainResponse; import org.example.dto.show.response.ShowSearchPaginationDomainResponse; import org.example.dto.show.response.ShowWithTicketingTimesDomainResponse; import org.example.entity.BaseEntity; @@ -66,10 +68,13 @@ public ShowInfoDomainResponse findShowInfo(UUID id) { return showRepository.findShowInfoById(id).orElseThrow(NoSuchElementException::new); } + public ShowPaginationDomainResponse findShows(ShowPaginationDomainRequest request) { + return showRepository.findShows(request); + } + @Transactional public void updateShow(UUID id, ShowUpdateDomainRequest request) { - Show show = findShowById(id); - show.changeShowInfo(request.toShow()); + Show show = findShowOrThrowNoSuchElementException(id); updateShowSearch(show); updateShowArtist(request.artistIds(), show); @@ -161,7 +166,7 @@ public void updateShowTicketingTimes(ShowTicketingTimes ticketingTimes, Show sho @Transactional public void deleteShow(UUID id) { - Show show = findShowById(id); + Show show = findShowOrThrowNoSuchElementException(id); show.softDelete(); var showArtists = showArtistRepository.findAllByShowIdAndIsDeletedFalse( @@ -200,7 +205,7 @@ public List findShowSearchesByShowId(UUID showId) { return showSearchRepository.findAllByShowIdAndIsDeletedFalse(showId); } - private Show findShowById(UUID id) { + private Show findShowOrThrowNoSuchElementException(UUID id) { return showRepository.findById(id).orElseThrow(NoSuchElementException::new); } } diff --git a/app/domain/show-domain/src/main/java/org/example/vo/ArtistSortStandardDomainType.java b/app/domain/show-domain/src/main/java/org/example/vo/ArtistSortType.java similarity index 72% rename from app/domain/show-domain/src/main/java/org/example/vo/ArtistSortStandardDomainType.java rename to app/domain/show-domain/src/main/java/org/example/vo/ArtistSortType.java index 4e5b0ba9..af798fbc 100644 --- a/app/domain/show-domain/src/main/java/org/example/vo/ArtistSortStandardDomainType.java +++ b/app/domain/show-domain/src/main/java/org/example/vo/ArtistSortType.java @@ -1,6 +1,6 @@ package org.example.vo; -public enum ArtistSortStandardDomainType { +public enum ArtistSortType { KOREAN_NAME_ASC, KOREAN_NAME_DESC, ENGLISH_NAME_ASC, diff --git a/app/domain/show-domain/src/main/java/org/example/vo/ShowSortType.java b/app/domain/show-domain/src/main/java/org/example/vo/ShowSortType.java new file mode 100644 index 00000000..76fc4ee6 --- /dev/null +++ b/app/domain/show-domain/src/main/java/org/example/vo/ShowSortType.java @@ -0,0 +1,5 @@ +package org.example.vo; + +public enum ShowSortType { + RECENT, POPULAR; +} diff --git a/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistRepositoryTest.java b/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistRepositoryTest.java index 556f978d..eefbfaa4 100644 --- a/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistRepositoryTest.java +++ b/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistRepositoryTest.java @@ -15,7 +15,7 @@ import org.example.repository.artist.artistgenre.ArtistGenreRepository; import org.example.repository.genre.GenreRepository; import org.example.vo.ArtistGender; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.example.vo.ArtistType; import org.example.vo.SubscriptionStatus; import org.junit.jupiter.api.Assertions; @@ -81,7 +81,7 @@ void findArtistSubscriptionExistArtistIds() { var request = ArtistRequestDtoFixture.artistPaginationDomainRequest( SubscriptionStatus.SUBSCRIBED, size, - ArtistSortStandardDomainType.ENGLISH_NAME_ASC, + ArtistSortType.ENGLISH_NAME_ASC, null, artists.stream().map(Artist::getId).toList(), ArtistFilterDomain.defaultArtistFilterDomain() @@ -106,7 +106,7 @@ void findArtistUnsubscriptionExceptSubscribedArtistIds() { var request = ArtistRequestDtoFixture.artistPaginationDomainRequest( SubscriptionStatus.UNSUBSCRIBED, size, - ArtistSortStandardDomainType.ENGLISH_NAME_ASC, + ArtistSortType.ENGLISH_NAME_ASC, null, artists.stream().map(Artist::getId).toList(), ArtistFilterDomain.defaultArtistFilterDomain() @@ -131,7 +131,7 @@ void findArtistUnsubscriptionWithNoneSubscriptionArtistIds() { var request = ArtistRequestDtoFixture.artistPaginationDomainRequest( SubscriptionStatus.UNSUBSCRIBED, size, - ArtistSortStandardDomainType.ENGLISH_NAME_ASC, + ArtistSortType.ENGLISH_NAME_ASC, null, List.of(), ArtistFilterDomain.defaultArtistFilterDomain() @@ -164,7 +164,7 @@ void findArtisNoneSubscribedArtistIdsWithFilter() { var request = ArtistRequestDtoFixture.artistPaginationDomainRequest( SubscriptionStatus.UNSUBSCRIBED, size, - ArtistSortStandardDomainType.ENGLISH_NAME_ASC, + ArtistSortType.ENGLISH_NAME_ASC, null, List.of(), ArtistFilterDomain.builder() @@ -201,7 +201,7 @@ void findArtistExceptSubscribedArtistIdsWithFilter() { var request = ArtistRequestDtoFixture.artistPaginationDomainRequest( SubscriptionStatus.UNSUBSCRIBED, size, - ArtistSortStandardDomainType.ENGLISH_NAME_ASC, + ArtistSortType.ENGLISH_NAME_ASC, null, artists.stream().map(Artist::getId).toList(), ArtistFilterDomain.builder() diff --git a/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistSearchRepositoryTest.java b/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistSearchRepositoryTest.java index 817d99ee..6848d7e7 100644 --- a/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistSearchRepositoryTest.java +++ b/app/domain/show-domain/src/test/java/org/example/repository/artist/ArtistSearchRepositoryTest.java @@ -10,7 +10,7 @@ import org.example.fixture.domain.ArtistFixture; import org.example.repository.artist.artistsearch.ArtistSearchRepository; import org.example.util.StringNormalizer; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; @@ -36,7 +36,7 @@ void searchArtistByKoreanNameAndEnglishName(String search) { artistSearchRepository.saveAll(artistSearches); ArtistSearchPaginationDomainRequest request = ArtistSearchPaginationDomainRequest.builder() - .sortStandard(ArtistSortStandardDomainType.ENGLISH_NAME_ASC) + .sortStandard(ArtistSortType.ENGLISH_NAME_ASC) .cursor(null) .size(2) .search(StringNormalizer.removeWhitespaceAndLowerCase(search)) diff --git a/app/domain/show-domain/src/test/java/org/example/repository/show/ShowRepositoryTest.java b/app/domain/show-domain/src/test/java/org/example/repository/show/ShowRepositoryTest.java index 8cfd0717..15895472 100644 --- a/app/domain/show-domain/src/test/java/org/example/repository/show/ShowRepositoryTest.java +++ b/app/domain/show-domain/src/test/java/org/example/repository/show/ShowRepositoryTest.java @@ -42,5 +42,4 @@ void findShowDetailWithTicketingTimes() { } ); } - } diff --git a/app/domain/show-domain/src/testFixtures/java/org/example/fixture/domain/ShowFixture.java b/app/domain/show-domain/src/testFixtures/java/org/example/fixture/domain/ShowFixture.java index 82f85662..3faed5b2 100644 --- a/app/domain/show-domain/src/testFixtures/java/org/example/fixture/domain/ShowFixture.java +++ b/app/domain/show-domain/src/testFixtures/java/org/example/fixture/domain/ShowFixture.java @@ -1,6 +1,7 @@ package org.example.fixture.domain; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; import java.util.Map; import java.util.stream.IntStream; @@ -24,6 +25,7 @@ public static Show deafultShow() { .endDate(LocalDate.EPOCH) .location("test_location") .image("test_image") + .lastTicketingAt(LocalDateTime.now()) .seatPrices(getSeatPrice()) .ticketingSites(getTicketingInfos()) .build(); diff --git a/app/domain/show-domain/src/testFixtures/java/org/example/fixture/dto/ArtistRequestDtoFixture.java b/app/domain/show-domain/src/testFixtures/java/org/example/fixture/dto/ArtistRequestDtoFixture.java index 566cf059..37253cff 100644 --- a/app/domain/show-domain/src/testFixtures/java/org/example/fixture/dto/ArtistRequestDtoFixture.java +++ b/app/domain/show-domain/src/testFixtures/java/org/example/fixture/dto/ArtistRequestDtoFixture.java @@ -6,7 +6,7 @@ import org.example.dto.artist.request.ArtistFilterTotalCountDomainRequest; import org.example.dto.artist.request.ArtistPaginationDomainRequest; import org.example.vo.ArtistGender; -import org.example.vo.ArtistSortStandardDomainType; +import org.example.vo.ArtistSortType; import org.example.vo.ArtistType; import org.example.vo.SubscriptionStatus; @@ -15,7 +15,7 @@ public class ArtistRequestDtoFixture { public static ArtistPaginationDomainRequest artistPaginationDomainRequest( SubscriptionStatus subscriptionStatus, int size, - ArtistSortStandardDomainType artistSortStandardDomainType, + ArtistSortType artistSortStandardDomainType, UUID cursor, List artistIds, ArtistFilterDomain artistFilterDomain diff --git a/common/src/main/java/org/example/util/DateTimeUtil.java b/common/src/main/java/org/example/util/DateTimeUtil.java index ef952cda..840b484e 100644 --- a/common/src/main/java/org/example/util/DateTimeUtil.java +++ b/common/src/main/java/org/example/util/DateTimeUtil.java @@ -1,15 +1,23 @@ package org.example.util; +import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.LocalTime; import java.time.format.DateTimeFormatter; public class DateTimeUtil { public static String formatLocalDateTime(LocalDateTime dateTime) { - DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-M-d"); - DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HH:mm"); + return formatDate(dateTime.toLocalDate()) + " " + formatTime(dateTime.toLocalTime()); + } - return dateTime.format(dateFormatter) + dateTime.format(timeFormatter); + public static String formatDate(LocalDate date) { + DateTimeFormatter dateFormatter = DateTimeFormatter.ofPattern("yyyy-M-d"); + return date.format(dateFormatter); } + public static String formatTime(LocalTime time) { + DateTimeFormatter timeFormatter = DateTimeFormatter.ofPattern("HH:mm"); + return time.format(timeFormatter); + } }