From 5cc8cf8d4aae58d5d3c7aa67a211596b371564ca Mon Sep 17 00:00:00 2001 From: splitCoding Date: Wed, 20 Sep 2023 20:59:25 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20DB=EB=A5=BC=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EB=8A=94=20=EC=BD=94=EB=93=9C=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../song/application/KillingPartService.java | 22 +- .../shook/song/application/SongService.java | 104 +- .../application/dto/KillingPartResponse.java | 5 +- .../song/application/dto/SongResponse.java | 31 +- .../application/dto/SongSwipeResponse.java | 14 +- .../dto/HighLikedSongResponse.java | 20 +- .../shook/shook/song/domain/KillingParts.java | 11 +- .../repository/KillingPartLikeRepository.java | 17 + .../repository/dto/SongKillingPartDto.java | 11 + .../domain/repository/SongRepository.java | 3 + backend/src/main/resources/application.yml | 6 +- backend/src/main/resources/dev/data.sql | 1148 ++++++++--------- .../song/application/SongServiceTest.java | 35 +- .../KillingPartLikeRepositoryTest.java | 44 +- .../shook/song/ui/MyPageControllerTest.java | 6 +- 15 files changed, 817 insertions(+), 660 deletions(-) create mode 100644 backend/src/main/java/shook/shook/song/domain/killingpart/repository/dto/SongKillingPartDto.java diff --git a/backend/src/main/java/shook/shook/song/application/KillingPartService.java b/backend/src/main/java/shook/shook/song/application/KillingPartService.java index e7d4174e9..d3816e886 100644 --- a/backend/src/main/java/shook/shook/song/application/KillingPartService.java +++ b/backend/src/main/java/shook/shook/song/application/KillingPartService.java @@ -11,9 +11,8 @@ import shook.shook.member.exception.MemberException; import shook.shook.member.exception.MemberException.MemberNotExistException; import shook.shook.song.application.dto.LikedKillingPartResponse; -import shook.shook.song.domain.killingpart.KillingPart; -import shook.shook.song.domain.killingpart.KillingPartLike; import shook.shook.song.domain.killingpart.repository.KillingPartLikeRepository; +import shook.shook.song.domain.killingpart.repository.dto.SongKillingPartDto; @RequiredArgsConstructor @Transactional(readOnly = true) @@ -33,14 +32,17 @@ public List findLikedKillingPartByMemberId( final Member member = memberRepository.findById(memberInfo.getMemberId()) .orElseThrow(MemberNotExistException::new); - final List likes = - killingPartLikeRepository.findAllByMemberAndIsDeleted(member, false); + final List likedKillingPartAndSongByMember = + killingPartLikeRepository.findLikedKillingPartAndSongByMember(member); - return likes.stream() - .sorted(Comparator.comparing(KillingPartLike::getUpdatedAt).reversed()) - .map(killingPartLike -> { - final KillingPart killingPart = killingPartLike.getKillingPart(); - return LikedKillingPartResponse.of(killingPart.getSong(), killingPart); - }).toList(); + return likedKillingPartAndSongByMember.stream() + .sorted(Comparator.comparing( + songKillingPart -> songKillingPart.getKillingPart().getCreatedAt()) + ).map( + songKillingPart -> LikedKillingPartResponse.of( + songKillingPart.getSong(), + songKillingPart.getKillingPart() + ) + ).toList(); } } diff --git a/backend/src/main/java/shook/shook/song/application/SongService.java b/backend/src/main/java/shook/shook/song/application/SongService.java index 826b0ae81..6b3b492d8 100644 --- a/backend/src/main/java/shook/shook/song/application/SongService.java +++ b/backend/src/main/java/shook/shook/song/application/SongService.java @@ -1,5 +1,6 @@ package shook.shook.song.application; +import java.util.Comparator; import java.util.List; import java.util.Map; import lombok.RequiredArgsConstructor; @@ -15,11 +16,12 @@ import shook.shook.song.application.dto.SongSwipeResponse; import shook.shook.song.application.dto.SongWithKillingPartsRegisterRequest; import shook.shook.song.application.killingpart.dto.HighLikedSongResponse; -import shook.shook.song.domain.InMemorySongs; import shook.shook.song.domain.Song; import shook.shook.song.domain.SongTitle; +import shook.shook.song.domain.killingpart.repository.KillingPartLikeRepository; import shook.shook.song.domain.killingpart.repository.KillingPartRepository; import shook.shook.song.domain.repository.SongRepository; +import shook.shook.song.domain.repository.dto.SongTotalLikeCountDto; import shook.shook.song.exception.SongException; @RequiredArgsConstructor @@ -29,12 +31,11 @@ public class SongService { private static final int AFTER_SONGS_COUNT = 10; private static final int BEFORE_SONGS_COUNT = 10; - private static final int TOP_COUNT = 100; private final SongRepository songRepository; private final KillingPartRepository killingPartRepository; private final MemberRepository memberRepository; - private final InMemorySongs inMemorySongs; + private final KillingPartLikeRepository killingPartLikeRepository; private final SongDataExcelReader songDataExcelReader; @Transactional @@ -54,24 +55,72 @@ private Song saveSong(final Song song) { } public List showHighLikedSongs() { - final List songs = inMemorySongs.getSongs(); - final List top100Songs = songs.subList(0, Math.min(TOP_COUNT, songs.size())); + final List songsWithLikeCount = songRepository.findAllWithTotalLikeCount(); + return HighLikedSongResponse.ofSongTotalLikeCounts( + sortByHighestLikeCountAndId(songsWithLikeCount) + ); + } - return HighLikedSongResponse.ofSongs(top100Songs); + private List sortByHighestLikeCountAndId( + final List songWithLikeCounts + ) { + return songWithLikeCounts.stream() + .sorted( + Comparator.comparing( + SongTotalLikeCountDto::getTotalLikeCount, + Comparator.reverseOrder() + ).thenComparing(dto -> dto.getSong().getId(), Comparator.reverseOrder()) + ).toList(); } public SongSwipeResponse findSongByIdForFirstSwipe( final Long songId, final MemberInfo memberInfo ) { - final Song currentSong = inMemorySongs.getSongById(songId); - - final List beforeSongs = inMemorySongs.getPrevLikedSongs(currentSong, BEFORE_SONGS_COUNT); - final List afterSongs = inMemorySongs.getNextLikedSongs(currentSong, AFTER_SONGS_COUNT); + final List sortedSong = getSongsSortedByTotalLikeCount(); + final Song currentSong = findSongById(songId); + final int currentSongIndex = sortedSong.indexOf(currentSong); + final List beforeSongs = getPrevSongsForSwipe(sortedSong, currentSongIndex); + final List afterSongs = getNextSongsForSwipe(sortedSong, currentSongIndex); return convertToSongSwipeResponse(memberInfo, currentSong, beforeSongs, afterSongs); } + private Song findSongById(final Long songId) { + return songRepository.findById(songId) + .orElseThrow(() -> new SongException.SongNotExistException( + Map.of("SongId", String.valueOf(songId)) + )); + } + + private List getSongsSortedByTotalLikeCount() { + final List allSongWithKillingParts = songRepository.findAllSongWithKillingParts(); + allSongWithKillingParts.sort( + Comparator.comparing(Song::getTotalLikeCount, Comparator.reverseOrder()) + .thenComparing(Song::getId, Comparator.reverseOrder())); + + return allSongWithKillingParts; + } + + private List getPrevSongsForSwipe(final List songList, final int songIndex) { + if (songIndex == -1) { + throw new SongException.SongNotExistException(); + } + final int validStartIndex = Math.max(0, songIndex - BEFORE_SONGS_COUNT); + + return songList.subList(validStartIndex, songIndex); + } + + private List getNextSongsForSwipe(final List songList, final int songIndex) { + if (songIndex == -1) { + throw new SongException.SongNotExistException(); + } + final int validStartIndex = Math.min(songList.size(), songIndex + 1); + final int validEndIndex = Math.min(songList.size(), songIndex + AFTER_SONGS_COUNT + 1); + + return songList.subList(validStartIndex, validEndIndex); + } + private SongSwipeResponse convertToSongSwipeResponse( final MemberInfo memberInfo, final Song currentSong, @@ -79,14 +128,19 @@ private SongSwipeResponse convertToSongSwipeResponse( final List afterSongs ) { final Authority authority = memberInfo.getAuthority(); - if (authority.isAnonymous()) { return SongSwipeResponse.ofUnauthorizedUser(currentSong, beforeSongs, afterSongs); } - final Member member = findMemberById(memberInfo.getMemberId()); - - return SongSwipeResponse.of(member, currentSong, beforeSongs, afterSongs); + final List likedKillingPartIds = + killingPartLikeRepository.findLikedKillingPartIdsByMember(member); + + return SongSwipeResponse.of( + currentSong, + beforeSongs, + afterSongs, + likedKillingPartIds + ); } private Member findMemberById(final Long memberId) { @@ -102,8 +156,13 @@ public List findSongByIdForBeforeSwipe( final Long songId, final MemberInfo memberInfo ) { - final Song currentSong = inMemorySongs.getSongById(songId); - final List beforeSongs = inMemorySongs.getPrevLikedSongs(currentSong, BEFORE_SONGS_COUNT); + final Song currentSong = findSongById(songId); + final List songsSortedByTotalLikeCount = getSongsSortedByTotalLikeCount(); + final int currentSongIndex = songsSortedByTotalLikeCount.indexOf(currentSong); + final List beforeSongs = getPrevSongsForSwipe( + songsSortedByTotalLikeCount, + currentSongIndex + ); return convertToSongResponses(memberInfo, beforeSongs); } @@ -121,9 +180,11 @@ private List convertToSongResponses( } final Member member = findMemberById(memberInfo.getMemberId()); + final List likedKillingPartIds = + killingPartLikeRepository.findLikedKillingPartIdsByMember(member); return songs.stream() - .map(song -> SongResponse.of(song, member)) + .map(song -> SongResponse.of(song, likedKillingPartIds)) .toList(); } @@ -131,8 +192,13 @@ public List findSongByIdForAfterSwipe( final Long songId, final MemberInfo memberInfo ) { - final Song currentSong = inMemorySongs.getSongById(songId); - final List afterSongs = inMemorySongs.getNextLikedSongs(currentSong, AFTER_SONGS_COUNT); + final Song currentSong = findSongById(songId); + final List songsSortedByTotalLikeCount = getSongsSortedByTotalLikeCount(); + final int currentSongIndex = songsSortedByTotalLikeCount.indexOf(currentSong); + final List afterSongs = getNextSongsForSwipe( + songsSortedByTotalLikeCount, + currentSongIndex + ); return convertToSongResponses(memberInfo, afterSongs); } diff --git a/backend/src/main/java/shook/shook/song/application/dto/KillingPartResponse.java b/backend/src/main/java/shook/shook/song/application/dto/KillingPartResponse.java index e67923f22..f3ba4c674 100644 --- a/backend/src/main/java/shook/shook/song/application/dto/KillingPartResponse.java +++ b/backend/src/main/java/shook/shook/song/application/dto/KillingPartResponse.java @@ -4,7 +4,6 @@ import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; -import shook.shook.member.domain.Member; import shook.shook.song.domain.Song; import shook.shook.song.domain.killingpart.KillingPart; @@ -41,7 +40,7 @@ public static KillingPartResponse of( final Song song, final KillingPart killingPart, final int rank, - final Member member + final boolean isLiked ) { return new KillingPartResponse( killingPart.getId(), @@ -51,7 +50,7 @@ public static KillingPartResponse of( killingPart.getEndSecond(), song.getPartVideoUrl(killingPart), killingPart.getLength(), - killingPart.isLikedByMember(member) + isLiked ); } } diff --git a/backend/src/main/java/shook/shook/song/application/dto/SongResponse.java b/backend/src/main/java/shook/shook/song/application/dto/SongResponse.java index bb2d5778a..7b41dd6cd 100644 --- a/backend/src/main/java/shook/shook/song/application/dto/SongResponse.java +++ b/backend/src/main/java/shook/shook/song/application/dto/SongResponse.java @@ -1,13 +1,12 @@ package shook.shook.song.application.dto; import io.swagger.v3.oas.annotations.media.Schema; +import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.IntStream; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; -import shook.shook.member.domain.Member; import shook.shook.song.domain.Song; import shook.shook.song.domain.killingpart.KillingPart; @@ -37,7 +36,10 @@ public class SongResponse { @Schema(description = "킬링파트 3개") private final List killingParts; - public static SongResponse of(final Song song, final Member member) { + public static SongResponse of( + final Song song, + final List likedKillingPartIds + ) { return new SongResponse( song.getId(), song.getTitle(), @@ -45,21 +47,32 @@ public static SongResponse of(final Song song, final Member member) { song.getLength(), song.getVideoId(), song.getAlbumCoverUrl(), - toKillingPartResponses(song, member) + toKillingPartResponses(song, likedKillingPartIds) ); } public static SongResponse fromUnauthorizedUser(final Song song) { - return SongResponse.of(song, null); + return SongResponse.of(song, Collections.emptyList()); } - private static List toKillingPartResponses(final Song song, - final Member member) { + private static List toKillingPartResponses( + final Song song, + final List likedKillingPartIds + ) { final List songKillingParts = song.getLikeCountSortedKillingParts(); return IntStream.range(0, songKillingParts.size()) .mapToObj(index -> - KillingPartResponse.of(song, songKillingParts.get(index), index + 1, member)) - .collect(Collectors.toList()); + { + final KillingPart killingPart = songKillingParts.get(index); + final int killingPartRank = index + 1; + return KillingPartResponse.of( + song, + killingPart, + killingPartRank, + likedKillingPartIds.contains(killingPart.getId()) + ); + }) + .toList(); } } diff --git a/backend/src/main/java/shook/shook/song/application/dto/SongSwipeResponse.java b/backend/src/main/java/shook/shook/song/application/dto/SongSwipeResponse.java index ee515b3b6..08d8c1cc3 100644 --- a/backend/src/main/java/shook/shook/song/application/dto/SongSwipeResponse.java +++ b/backend/src/main/java/shook/shook/song/application/dto/SongSwipeResponse.java @@ -5,7 +5,6 @@ import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; -import shook.shook.member.domain.Member; import shook.shook.song.domain.Song; @Schema(description = "첫 스와이프 시, 현재 노래와 이전, 이후 노래 리스트 조회 응답") @@ -23,20 +22,21 @@ public class SongSwipeResponse { private final List nextSongs; public static SongSwipeResponse of( - final Member member, final Song currentSong, final List prevSongs, - final List nextSongs + final List nextSongs, + final List likedKillingPartIds ) { - final SongResponse currentResponse = SongResponse.of(currentSong, member); + final SongResponse currentResponse = SongResponse.of(currentSong, likedKillingPartIds); final List prevResponses = prevSongs.stream() - .map(song -> SongResponse.of(song, member)) + .map(song -> SongResponse.of(song, likedKillingPartIds)) .toList(); final List nextResponses = nextSongs.stream() - .map(song -> SongResponse.of(song, member)) + .map(song -> SongResponse.of(song, likedKillingPartIds)) .toList(); - return new SongSwipeResponse(prevResponses, currentResponse, nextResponses); + return new SongSwipeResponse(prevResponses, + currentResponse, nextResponses); } public static SongSwipeResponse ofUnauthorizedUser( diff --git a/backend/src/main/java/shook/shook/song/application/killingpart/dto/HighLikedSongResponse.java b/backend/src/main/java/shook/shook/song/application/killingpart/dto/HighLikedSongResponse.java index 1342e4db7..a62daec5d 100644 --- a/backend/src/main/java/shook/shook/song/application/killingpart/dto/HighLikedSongResponse.java +++ b/backend/src/main/java/shook/shook/song/application/killingpart/dto/HighLikedSongResponse.java @@ -1,11 +1,11 @@ package shook.shook.song.application.killingpart.dto; import io.swagger.v3.oas.annotations.media.Schema; +import java.util.List; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; -import shook.shook.song.domain.Song; -import java.util.List; +import shook.shook.song.domain.repository.dto.SongTotalLikeCountDto; @Schema(description = "좋아요 순 노래 응답") @AllArgsConstructor(access = AccessLevel.PRIVATE) @@ -27,17 +27,19 @@ public class HighLikedSongResponse { @Schema(description = "총 좋아요 개수", example = "40") private final long totalLikeCount; - private static HighLikedSongResponse from(final Song song) { + private static HighLikedSongResponse from(final SongTotalLikeCountDto songTotalVoteCountDto) { return new HighLikedSongResponse( - song.getId(), - song.getTitle(), - song.getSinger(), - song.getAlbumCoverUrl(), - song.getTotalLikeCount() + songTotalVoteCountDto.getSong().getId(), + songTotalVoteCountDto.getSong().getTitle(), + songTotalVoteCountDto.getSong().getSinger(), + songTotalVoteCountDto.getSong().getAlbumCoverUrl(), + songTotalVoteCountDto.getTotalLikeCount() ); } - public static List ofSongs(final List songs) { + public static List ofSongTotalLikeCounts( + final List songs + ) { return songs.stream() .map(HighLikedSongResponse::from) .toList(); diff --git a/backend/src/main/java/shook/shook/song/domain/KillingParts.java b/backend/src/main/java/shook/shook/song/domain/KillingParts.java index 5300cdbd4..ae1ecccc8 100644 --- a/backend/src/main/java/shook/shook/song/domain/KillingParts.java +++ b/backend/src/main/java/shook/shook/song/domain/KillingParts.java @@ -51,14 +51,21 @@ protected void setSong(final Song song) { } } + public int getTotalLikeCount() { + return killingParts.stream() + .map(KillingPart::getLikeCount) + .reduce(0, Integer::sum); + } + public List getKillingParts() { return new ArrayList<>(killingParts); } public List getKillingPartsSortedByLikeCount() { return killingParts.stream() - .sorted(Comparator.comparing(KillingPart::getLikeCount, Comparator.reverseOrder()) - .thenComparing(KillingPart::getStartSecond)) + .sorted( + Comparator.comparing(KillingPart::getLikeCount, Comparator.reverseOrder()) + .thenComparing(KillingPart::getStartSecond)) .toList(); } diff --git a/backend/src/main/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepository.java b/backend/src/main/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepository.java index bb210fe3c..992710cd6 100644 --- a/backend/src/main/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepository.java +++ b/backend/src/main/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepository.java @@ -3,10 +3,13 @@ import java.util.List; import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import shook.shook.member.domain.Member; import shook.shook.song.domain.killingpart.KillingPart; import shook.shook.song.domain.killingpart.KillingPartLike; +import shook.shook.song.domain.killingpart.repository.dto.SongKillingPartDto; @Repository public interface KillingPartLikeRepository extends JpaRepository { @@ -15,4 +18,18 @@ Optional findByKillingPartAndMember(final KillingPart killingPa final Member member); List findAllByMemberAndIsDeleted(final Member member, final boolean isDeleted); + + @Query("SELECT s as song, kp as killingPart " + + "FROM Song s " + + "LEFT JOIN KillingPart kp ON s = kp.song " + + "LEFT JOIN KillingPartLike kp_like ON kp = kp_like.killingPart " + + "WHERE kp_like.member = :member and kp_like.isDeleted = false") + List findLikedKillingPartAndSongByMember( + @Param("member") final Member member + ); + + @Query("SELECT kp_like.id " + + "FROM KillingPartLike kp_like " + + "WHERE kp_like.member=:member and kp_like.isDeleted=false") + List findLikedKillingPartIdsByMember(@Param("member") final Member member); } diff --git a/backend/src/main/java/shook/shook/song/domain/killingpart/repository/dto/SongKillingPartDto.java b/backend/src/main/java/shook/shook/song/domain/killingpart/repository/dto/SongKillingPartDto.java new file mode 100644 index 000000000..99d294cc7 --- /dev/null +++ b/backend/src/main/java/shook/shook/song/domain/killingpart/repository/dto/SongKillingPartDto.java @@ -0,0 +1,11 @@ +package shook.shook.song.domain.killingpart.repository.dto; + +import shook.shook.song.domain.Song; +import shook.shook.song.domain.killingpart.KillingPart; + +public interface SongKillingPartDto { + + Song getSong(); + + KillingPart getKillingPart(); +} diff --git a/backend/src/main/java/shook/shook/song/domain/repository/SongRepository.java b/backend/src/main/java/shook/shook/song/domain/repository/SongRepository.java index fca5fd529..93155db85 100644 --- a/backend/src/main/java/shook/shook/song/domain/repository/SongRepository.java +++ b/backend/src/main/java/shook/shook/song/domain/repository/SongRepository.java @@ -47,4 +47,7 @@ List findSongsWithMoreLikeCountThanSongWithId( ); boolean existsSongByTitle(final SongTitle title); + + @Query("SELECT s FROM Song s LEFT JOIN FETCH s.killingParts.killingParts kp") + List findAllSongWithKillingParts(); } diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 60d063b31..c8292a605 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -12,8 +12,10 @@ spring: on-profile: local datasource: - driver-class-name: org.h2.Driver - url: jdbc:h2:mem:shook;MODE=MySQL + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3306/shook + username: root + password: root h2: console: diff --git a/backend/src/main/resources/dev/data.sql b/backend/src/main/resources/dev/data.sql index 620344dff..314af62e0 100644 --- a/backend/src/main/resources/dev/data.sql +++ b/backend/src/main/resources/dev/data.sql @@ -1,576 +1,576 @@ TRUNCATE TABLE song; TRUNCATE TABLE voting_song; - -insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) -values ('N.Y.C.T', 'NCT U', 241, '8umUXHLGl3o', 'https://cdnimg.melon.co.kr/cm2/album/images/113/22/590/11322590_20230907111726_500.jpg?3d8bcc03a4900fdba3f199390f432b24/melon/resize/140/quality/80/optimize', now()); - -insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) -values ('Slow Dancing', 'V', 190, 'eI0iTRS0Ha8', 'https://cdnimg.melon.co.kr/cm2/album/images/113/03/638/11303638_20230811103847_500.jpg?92b308988cd1521e8bd4d9c2f56768ed/melon/resize/140/quality/80/optimize', now()); - -insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) -values ('LET''S DANCE', '이채연', 222, 'kQFLWdjk_8s', 'https://cdnimg.melon.co.kr/cm2/album/images/113/19/933/11319933_20230905152508_500.jpg?2bc0bb896e182ebb6ab11119b40657bc/melon/resize/140/quality/80/optimize', now()); - -insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) -values ('Smoke (Prod. Dynamicduo, Padi)', '다이나믹 듀오, 이영지', 210, 'ZwXzaqzRVi4', 'https://cdnimg.melon.co.kr/cm2/album/images/113/15/612/11315612_20230905120657_500.jpg?e9f1ae79ad72f3749b9678e7ebd90027/melon/resize/140/quality/80/optimize', now()); - -insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) -values ('뭣 같아', 'BOYNEXTDOOR', 180, '97_-_WugRFA', 'https://cdnimg.melon.co.kr/cm2/album/images/113/19/182/11319182_20230904102829_500.jpg?6555bb763ac1707683f5d05c0ab1b496/melon/resize/140/quality/80/optimize', now()); - -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 1, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 1, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 1, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('해요 (2022)', '#안녕', 238, 'P6gV_t70KAk', 'https://cdnimg.melon.co.kr/cm2/album/images/109/75/276/10975276_20220603165713_500.jpg?690c69f1d7581bed46767533175728ff/melon/resize/282/quality/80/optimize', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 2, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 2, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 2, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('TOMBOY', '(여자)아이들', 174, '0wezH4MAncY', 'https://cdnimg.melon.co.kr/cm2/album/images/108/90/384/10890384_20220314111504_500.jpg?4b9dba7aeba43a4e0042eedb6b9865c1/melon/resize/282/quality/80/optimize', 'ROCK_METAL', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 3, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 3, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 3, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('다정히 내 이름을 부르면', '경서예지, 전건호', 263, 'b_6EfFZyBxY', 'https://cdnimg.melon.co.kr/cm2/album/images/106/10/525/10610525_20210518143433_500.jpg?e8c5aa44ff6608c13fa48eb6a20e81af/melon/resize/282/quality/80/optimize', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 4, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 4, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 4, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('That''s Hilarious', 'Charlie Puth', 146, 'F3KMndbOhIcㅍ', 'https://cdnimg.melon.co.kr/cm2/album/images/108/44/485/10844485_20221006154824_500.jpg?b752b5ed8fad66b79e2705840630dd94/melon/resize/282/quality/80/optimize', 'POP', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 5, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 5, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 5, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Heaven(2023)', '임재현', 279, 'fPLXgfcyoMc', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 6, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 6, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 6, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('당신을 만나', '김호중, 송가인', 238, 'kn_j1Ipw4DM', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'TROT', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 7, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 7, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 7, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('잘 지내자, 우리 (여름날 우리 X 로이킴)', '로이킴', 258, 'MbSAeRQl0Xw', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'INDIE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 8, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 8, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 8, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('빛이 나는 너에게', '던 (DAWN)', 175, 'wkr3S0hIXLk', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 9, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 9, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 9, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('파랑 (Blue Wave)', 'NCT DREAM', 189, 'NhgoqtRhb4g', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 10, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 10, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 10, 3, now()); - - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Ling Ling', '검정치마', 230, 'gjQwwWjxPaQ', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/976/703/82976703_1663118461097_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 11, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 11, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 11, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('고백', '델리 스파이스 (Deli Spice)', 323, 'BYyVDi8BpZw', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/015/027/552/15027552_1368610256849_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 12, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 12, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 12, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Polaroid', 'ENHYPEN', 184, 'vRdZVDWs3BI', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/472/258/82472258_1641790812739_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 13, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 13, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 13, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('사랑앓이', 'FTISLAND', 218, 'gnLwCb8Cz7I', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/049/974/430/49974430_1317964170310_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 14, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 14, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 14, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('맞네', 'LUCY', 276, 'BRs0GGCT4bU', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/427/599/82427599_1638854125897_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 15, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 15, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 15, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Madeleine Love', 'CHEEZE (치즈)', 218, 'EHTagN5HJKQ', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/080/580/341/80580341_1431423374354_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 16, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 16, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 16, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('26', '윤하 (YOUNHA)', 199, 'eUqwF1-jjwQ', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/341/257/81341257_1578293989428_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 17, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 17, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 17, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('하늘 위로', 'IZ*ONE (아이즈원)', 192, 'P1jdwGsV4lk', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 18, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 18, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 18, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Super Shy', 'NewJeans', 200, 'ArmDp-zijuc', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 19, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 19, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 19, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Seven (feat. Latto) - Clean Ver.', '정국', 186, 'UUSbUBYqU_8', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'RHYTHM_AND_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 20, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 20, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 20, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('퀸카 (Queencard)', '(여자)아이들', 162, 'VOcb6ZHxSjc', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 21, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 21, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 21, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('헤어지자 말해요', '박재정', 244, 'SrQzxD8UFdM', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 22, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 22, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 22, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('I AM', 'IVE (아이브)', 208, 'cU0JrSAyy7o', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 23, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 23, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 23, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('이브, 프시케 그리고 푸른 수염의 아내', 'LE SSERAFIM (르세라핌)', 186, - 'Ii8L0qEvfC8', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', - 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 24, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 24, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 24, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Spicy', 'aespa', 198, '1kfmWl3o8TE', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 25, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 25, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 25, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Steal The Show (From "엘리멘탈")', 'Lauv', 194, 'kUMds6XKtfY', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'POP', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 26, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 26, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 26, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('사랑은 늘 도망가', '임영웅', 273, 'pBEAzM2TRmE', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 27, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 27, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 27, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('ISTJ', 'NCT DREAM', 186, 'es60T3k-tyM', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 28, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 28, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 28, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('모래 알갱이', '임영웅', 221, '3_wOZrzmQ1o', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 29, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 29, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 29, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('UNFORGIVEN (feat. Nile Rodgers)', 'LE SSERAFIM (르세라핌)', 181, - 'fzSDGXyGTjg', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 30, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 30, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 30, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Kitsch', 'IVE (아이브)', 195, 'r572qh2__-U', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 31, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 31, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 31, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('우리들의 블루스', '임영웅', 207, 'epz-aL5RaLQ', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 32, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 32, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 32, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Candy', 'NCT DREAM', 220, 'QuaVFoBLQeg', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 33, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 33, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 33, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Hype boy', 'NewJeans', 180, 'T--6HBX2K4g', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 34, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 34, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 34, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('다시 만날 수 있을까', '임영웅', 275, 'VPDRLgfqfSs', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 35, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 35, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 35, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Broken Melodies', 'NCT DREAM', 227, 'EPsh2192sTU', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 36, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 36, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 36, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Still With You', '정국', 239, 'BksBNbTIoPE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'RHYTHM_AND_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 37, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 37, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 37, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('무지개', '임영웅', 198, 'o8e0Qd2H1qc', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 38, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 38, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 38, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Ditto', 'NewJeans', 187, 'haCpjUXIhrI', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 39, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 39, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 39, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('London Boy', '임영웅', 289, 'ZRDuScdwEbE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 40, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 40, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 40, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('이제 나만 믿어요', '임영웅', 274, 'y1KXYmMuZZA', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'TROT', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 41, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 41, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 41, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('아버지', '임영웅', 240, 'dbaiMJOnaB4', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'TROT', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 42, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 42, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 42, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Polaroid', '임영웅', 209, 'PVDxs6GUXSI', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 43, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 43, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 43, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Dynamite', '방탄소년단', 198, 'KhZ5DCd7m6s', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'POP', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 44, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 44, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 44, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('손오공', '세븐틴 (SEVENTEEN)', 200, 'tFPbzfU5XL4', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 45, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 45, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 45, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('인생찬가', '임영웅', 235, 'cXHduPVrcDQ', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 46, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 46, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 46, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('A bientot', '임영웅', 258, 'sZDDLUB8wQE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 47, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 47, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 47, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('손이 참 곱던 그대', '임영웅', 197, 'OpZIaI-J0uk', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 48, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 48, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 48, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('사랑해 진짜', '임영웅', 241, 'qkledxNCNfY', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 49, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 49, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 49, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('꽃', '지수', 174, '6zM48_rBFbY', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 50, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 50, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 50, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('연애편지', '임영웅', 217, 'gSQFZvUuQ3s', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 51, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 51, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 51, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('New jeans', 'New jeans', 109, 'G8GEpK7YDl4', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 52, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 52, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 52, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('OMG', 'New jeans', 215, 'jT0Lh-N3TSg', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 53, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 53, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 53, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Butter', '방탄소년단', 165, 'Uz0PppyT7Cc', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 54, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 54, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 54, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('파랑 (Blue Wave)', 'NCT DREAM', 191, 'ZkLK4hUqqas', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 55, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 55, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 55, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Take Two', '방탄소년단', 230, '3UE-vpej_VI', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 56, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 56, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 56, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Like We Just Met', 'NCT DREAM', 210, 'eA9pwL-8wJw', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 57, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 57, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 57, 3, now()); - -INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) -VALUES ('Yogurt Shake', 'NCT DREAM', 218, 'IUs7tOzHVJw', - 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (5, 'SHORT', 58, 10, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (10, 'STANDARD', 58, 5, now()); -INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) -VALUES (100, 'LONG', 58, 3, now()); +-- +-- insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) +-- values ('N.Y.C.T', 'NCT U', 241, '8umUXHLGl3o', 'https://cdnimg.melon.co.kr/cm2/album/images/113/22/590/11322590_20230907111726_500.jpg?3d8bcc03a4900fdba3f199390f432b24/melon/resize/140/quality/80/optimize', now()); +-- +-- insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) +-- values ('Slow Dancing', 'V', 190, 'eI0iTRS0Ha8', 'https://cdnimg.melon.co.kr/cm2/album/images/113/03/638/11303638_20230811103847_500.jpg?92b308988cd1521e8bd4d9c2f56768ed/melon/resize/140/quality/80/optimize', now()); +-- +-- insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) +-- values ('LET''S DANCE', '이채연', 222, 'kQFLWdjk_8s', 'https://cdnimg.melon.co.kr/cm2/album/images/113/19/933/11319933_20230905152508_500.jpg?2bc0bb896e182ebb6ab11119b40657bc/melon/resize/140/quality/80/optimize', now()); +-- +-- insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) +-- values ('Smoke (Prod. Dynamicduo, Padi)', '다이나믹 듀오, 이영지', 210, 'ZwXzaqzRVi4', 'https://cdnimg.melon.co.kr/cm2/album/images/113/15/612/11315612_20230905120657_500.jpg?e9f1ae79ad72f3749b9678e7ebd90027/melon/resize/140/quality/80/optimize', now()); +-- +-- insert into voting_song (title, singer, length, video_id, album_cover_url, created_at) +-- values ('뭣 같아', 'BOYNEXTDOOR', 180, '97_-_WugRFA', 'https://cdnimg.melon.co.kr/cm2/album/images/113/19/182/11319182_20230904102829_500.jpg?6555bb763ac1707683f5d05c0ab1b496/melon/resize/140/quality/80/optimize', now()); +-- +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 1, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 1, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 1, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('해요 (2022)', '#안녕', 238, 'P6gV_t70KAk', 'https://cdnimg.melon.co.kr/cm2/album/images/109/75/276/10975276_20220603165713_500.jpg?690c69f1d7581bed46767533175728ff/melon/resize/282/quality/80/optimize', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 2, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 2, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 2, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('TOMBOY', '(여자)아이들', 174, '0wezH4MAncY', 'https://cdnimg.melon.co.kr/cm2/album/images/108/90/384/10890384_20220314111504_500.jpg?4b9dba7aeba43a4e0042eedb6b9865c1/melon/resize/282/quality/80/optimize', 'ROCK_METAL', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 3, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 3, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 3, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('다정히 내 이름을 부르면', '경서예지, 전건호', 263, 'b_6EfFZyBxY', 'https://cdnimg.melon.co.kr/cm2/album/images/106/10/525/10610525_20210518143433_500.jpg?e8c5aa44ff6608c13fa48eb6a20e81af/melon/resize/282/quality/80/optimize', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 4, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 4, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 4, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('That''s Hilarious', 'Charlie Puth', 146, 'F3KMndbOhIcㅍ', 'https://cdnimg.melon.co.kr/cm2/album/images/108/44/485/10844485_20221006154824_500.jpg?b752b5ed8fad66b79e2705840630dd94/melon/resize/282/quality/80/optimize', 'POP', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 5, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 5, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 5, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Heaven(2023)', '임재현', 279, 'fPLXgfcyoMc', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 6, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 6, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 6, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('당신을 만나', '김호중, 송가인', 238, 'kn_j1Ipw4DM', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'TROT', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 7, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 7, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 7, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('잘 지내자, 우리 (여름날 우리 X 로이킴)', '로이킴', 258, 'MbSAeRQl0Xw', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'INDIE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 8, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 8, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 8, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('빛이 나는 너에게', '던 (DAWN)', 175, 'wkr3S0hIXLk', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 9, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 9, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 9, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('파랑 (Blue Wave)', 'NCT DREAM', 189, 'NhgoqtRhb4g', 'https://cdnimg.melon.co.kr/cm2/album/images/111/54/876/11154876_20230121133335_500.jpg?0ae26bb599c92ddd436282395563596e/melon/resize/282/quality/80/optimize', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 10, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 10, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 10, 3, now()); +-- +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Ling Ling', '검정치마', 230, 'gjQwwWjxPaQ', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/976/703/82976703_1663118461097_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 11, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 11, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 11, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('고백', '델리 스파이스 (Deli Spice)', 323, 'BYyVDi8BpZw', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/015/027/552/15027552_1368610256849_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 12, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 12, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 12, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Polaroid', 'ENHYPEN', 184, 'vRdZVDWs3BI', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/472/258/82472258_1641790812739_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 13, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 13, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 13, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('사랑앓이', 'FTISLAND', 218, 'gnLwCb8Cz7I', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/049/974/430/49974430_1317964170310_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 14, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 14, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 14, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('맞네', 'LUCY', 276, 'BRs0GGCT4bU', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/082/427/599/82427599_1638854125897_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 15, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 15, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 15, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Madeleine Love', 'CHEEZE (치즈)', 218, 'EHTagN5HJKQ', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/080/580/341/80580341_1431423374354_1_600x600.JPG/dims/resize/Q_80,0', 'INDIE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 16, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 16, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 16, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('26', '윤하 (YOUNHA)', 199, 'eUqwF1-jjwQ', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/341/257/81341257_1578293989428_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 17, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 17, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 17, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('하늘 위로', 'IZ*ONE (아이즈원)', 192, 'P1jdwGsV4lk', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 18, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 18, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 18, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Super Shy', 'NewJeans', 200, 'ArmDp-zijuc', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 19, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 19, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 19, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Seven (feat. Latto) - Clean Ver.', '정국', 186, 'UUSbUBYqU_8', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'RHYTHM_AND_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 20, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 20, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 20, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('퀸카 (Queencard)', '(여자)아이들', 162, 'VOcb6ZHxSjc', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 21, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 21, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 21, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('헤어지자 말해요', '박재정', 244, 'SrQzxD8UFdM', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 22, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 22, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 22, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('I AM', 'IVE (아이브)', 208, 'cU0JrSAyy7o', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 23, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 23, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 23, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('이브, 프시케 그리고 푸른 수염의 아내', 'LE SSERAFIM (르세라핌)', 186, +-- 'Ii8L0qEvfC8', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', +-- 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 24, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 24, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 24, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Spicy', 'aespa', 198, '1kfmWl3o8TE', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 25, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 25, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 25, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Steal The Show (From "엘리멘탈")', 'Lauv', 194, 'kUMds6XKtfY', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'POP', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 26, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 26, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 26, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('사랑은 늘 도망가', '임영웅', 273, 'pBEAzM2TRmE', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 27, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 27, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 27, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('ISTJ', 'NCT DREAM', 186, 'es60T3k-tyM', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 28, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 28, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 28, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('모래 알갱이', '임영웅', 221, '3_wOZrzmQ1o', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 29, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 29, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 29, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('UNFORGIVEN (feat. Nile Rodgers)', 'LE SSERAFIM (르세라핌)', 181, +-- 'fzSDGXyGTjg', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 30, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 30, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 30, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Kitsch', 'IVE (아이브)', 195, 'r572qh2__-U', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 31, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 31, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 31, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('우리들의 블루스', '임영웅', 207, 'epz-aL5RaLQ', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 32, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 32, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 32, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Candy', 'NCT DREAM', 220, 'QuaVFoBLQeg', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 33, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 33, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 33, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Hype boy', 'NewJeans', 180, 'T--6HBX2K4g', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 34, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 34, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 34, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('다시 만날 수 있을까', '임영웅', 275, 'VPDRLgfqfSs', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 35, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 35, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 35, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Broken Melodies', 'NCT DREAM', 227, 'EPsh2192sTU', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'ROCK_METAL', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 36, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 36, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 36, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Still With You', '정국', 239, 'BksBNbTIoPE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'RHYTHM_AND_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 37, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 37, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 37, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('무지개', '임영웅', 198, 'o8e0Qd2H1qc', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 38, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 38, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 38, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Ditto', 'NewJeans', 187, 'haCpjUXIhrI', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 39, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 39, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 39, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('London Boy', '임영웅', 289, 'ZRDuScdwEbE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 40, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 40, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 40, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('이제 나만 믿어요', '임영웅', 274, 'y1KXYmMuZZA', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'TROT', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 41, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 41, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 41, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('아버지', '임영웅', 240, 'dbaiMJOnaB4', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'TROT', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 42, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 42, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 42, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Polaroid', '임영웅', 209, 'PVDxs6GUXSI', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 43, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 43, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 43, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Dynamite', '방탄소년단', 198, 'KhZ5DCd7m6s', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'POP', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 44, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 44, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 44, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('손오공', '세븐틴 (SEVENTEEN)', 200, 'tFPbzfU5XL4', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 45, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 45, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 45, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('인생찬가', '임영웅', 235, 'cXHduPVrcDQ', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 46, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 46, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 46, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('A bientot', '임영웅', 258, 'sZDDLUB8wQE', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 47, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 47, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 47, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('손이 참 곱던 그대', '임영웅', 197, 'OpZIaI-J0uk', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'BALLAD', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 48, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 48, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 48, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('사랑해 진짜', '임영웅', 241, 'qkledxNCNfY', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'FOLK_BLUES', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 49, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 49, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 49, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('꽃', '지수', 174, '6zM48_rBFbY', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 50, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 50, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 50, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('연애편지', '임영웅', 217, 'gSQFZvUuQ3s', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 51, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 51, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 51, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('New jeans', 'New jeans', 109, 'G8GEpK7YDl4', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 52, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 52, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 52, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('OMG', 'New jeans', 215, 'jT0Lh-N3TSg', 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 53, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 53, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 53, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Butter', '방탄소년단', 165, 'Uz0PppyT7Cc', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 54, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 54, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 54, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('파랑 (Blue Wave)', 'NCT DREAM', 191, 'ZkLK4hUqqas', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 55, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 55, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 55, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Take Two', '방탄소년단', 230, '3UE-vpej_VI', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 56, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 56, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 56, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Like We Just Met', 'NCT DREAM', 210, 'eA9pwL-8wJw', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 57, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 57, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 57, 3, now()); +-- +-- INSERT INTO song (title, singer, length, video_id, album_cover_url, genre, created_at) +-- VALUES ('Yogurt Shake', 'NCT DREAM', 218, 'IUs7tOzHVJw', +-- 'https://image.genie.co.kr/Y/IMAGE/IMG_ALBUM/081/179/198/81179198_1554106431207_1_600x600.JPG/dims/resize/Q_80,0', 'DANCE', now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (5, 'SHORT', 58, 10, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (10, 'STANDARD', 58, 5, now()); +-- INSERT INTO killing_part(start_second, length, song_id, like_count, created_at) +-- VALUES (100, 'LONG', 58, 3, now()); diff --git a/backend/src/test/java/shook/shook/song/application/SongServiceTest.java b/backend/src/test/java/shook/shook/song/application/SongServiceTest.java index cf19ca79c..6a0a9ad79 100644 --- a/backend/src/test/java/shook/shook/song/application/SongServiceTest.java +++ b/backend/src/test/java/shook/shook/song/application/SongServiceTest.java @@ -20,7 +20,6 @@ import shook.shook.song.application.dto.SongSwipeResponse; import shook.shook.song.application.dto.SongWithKillingPartsRegisterRequest; import shook.shook.song.application.killingpart.dto.HighLikedSongResponse; -import shook.shook.song.domain.InMemorySongs; import shook.shook.song.domain.Song; import shook.shook.song.domain.killingpart.KillingPart; import shook.shook.song.domain.killingpart.KillingPartLike; @@ -39,14 +38,14 @@ class SongServiceTest extends UsingJpaTest { @Autowired private KillingPartRepository killingPartRepository; + @Autowired + private KillingPartLikeRepository killingPartLikeRepository; + @Autowired private KillingPartLikeRepository likeRepository; @Autowired private MemberRepository memberRepository; - - private InMemorySongs inMemorySongs = new InMemorySongs(); - private SongService songService; @BeforeEach @@ -55,7 +54,7 @@ public void setUp() { songRepository, killingPartRepository, memberRepository, - inMemorySongs, + killingPartLikeRepository, new SongDataExcelReader(" ", " ", " ") ); } @@ -65,7 +64,7 @@ public void setUp() { void register() { // given final SongWithKillingPartsRegisterRequest request = new SongWithKillingPartsRegisterRequest( - "title", "elevenVideo", "imageUrl", "singer", 300, "댄스", + "title", "elevenVideo", "imageUrl", "singer", 300, "발라드", List.of( new KillingPartRegisterRequest(10, 5), new KillingPartRegisterRequest(15, 10), @@ -98,7 +97,6 @@ void findById_exist_login_member() { final Member member = createAndSaveMember("email@naver.com", "email"); final Song song = registerNewSong("title"); addLikeToEachKillingParts(song, member); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); //when saveAndClearEntityManager(); @@ -135,9 +133,8 @@ void findById_exist_login_member() { void findById_exist_not_login_member() { //given final Song song = registerNewSong("title"); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); - //when인 + //when saveAndClearEntityManager(); final SongSwipeResponse response = songService.findSongByIdForFirstSwipe(song.getId(), @@ -172,7 +169,6 @@ void findById_exist_not_login_member() { void findById_notExist() { //given final Member member = createAndSaveMember("email@naver.com", "email"); - //when //then assertThatThrownBy(() -> songService.findSongByIdForFirstSwipe( @@ -200,7 +196,6 @@ void showHighLikedSongs() { addLikeToEachKillingParts(fourthSong, member1); saveAndClearEntityManager(); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); // when final List result = songService.showHighLikedSongs(); @@ -225,7 +220,12 @@ void showHighLikedSongs() { private Song registerNewSong(final String title) { final SongWithKillingPartsRegisterRequest request = new SongWithKillingPartsRegisterRequest( - title, "elevenVideo", "imageUrl", "singer", 300, "댄스", + title, + "elevenVideo", + "imageUrl", + "singer", + 300, + "발라드", List.of( new KillingPartRegisterRequest(10, 5), new KillingPartRegisterRequest(15, 10), @@ -269,10 +269,17 @@ void firstFindByMember() { addLikeToEachKillingParts(thirdSong, member); addLikeToEachKillingParts(fourthSong, member); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); saveAndClearEntityManager(); + final List songByIdForBeforeSwipe = songService.findSongByIdForBeforeSwipe( + fifthSong.getId(), + new MemberInfo(member.getId(), Authority.MEMBER)); + + final List songByIdForAfterSwipe = songService.findSongByIdForAfterSwipe( + fifthSong.getId(), + new MemberInfo(member.getId(), Authority.MEMBER)); + // when final SongSwipeResponse result = songService.findSongByIdForFirstSwipe(fifthSong.getId(), @@ -333,7 +340,6 @@ void findSongByIdForBeforeSwipe() { addLikeToEachKillingParts(fourthSong, member2); addLikeToEachKillingParts(firstSong, member2); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); // 정렬 순서: 2L, 4L, 1L, 5L, 3L saveAndClearEntityManager(); @@ -366,7 +372,6 @@ void findSongByIdForAfterSwipe() { addLikeToEachKillingParts(secondSong, member2); addLikeToEachKillingParts(standardSong, member2); addLikeToEachKillingParts(firstSong, member2); - inMemorySongs.recreate(songRepository.findAllWithKillingParts()); // 정렬 순서: 2L, 4L, 1L, 5L, 3L diff --git a/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepositoryTest.java b/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepositoryTest.java index 68be0fd8d..322f270f8 100644 --- a/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepositoryTest.java +++ b/backend/src/test/java/shook/shook/song/domain/killingpart/repository/KillingPartLikeRepositoryTest.java @@ -15,12 +15,14 @@ import shook.shook.member.domain.repository.MemberRepository; import shook.shook.song.domain.killingpart.KillingPart; import shook.shook.song.domain.killingpart.KillingPartLike; +import shook.shook.song.domain.killingpart.repository.dto.SongKillingPartDto; import shook.shook.support.UsingJpaTest; @Sql("classpath:/killingpart/initialize_killing_part_song.sql") class KillingPartLikeRepositoryTest extends UsingJpaTest { - private static KillingPart SAVED_KILLING_PART; + private static KillingPart FIRST_SAVED_KILLING_PART; + private static KillingPart SECOND_SAVED_KILLING_PART; private static Member SAVED_MEMBER; @Autowired @@ -34,7 +36,8 @@ class KillingPartLikeRepositoryTest extends UsingJpaTest { @BeforeEach void setUp() { - SAVED_KILLING_PART = killingPartRepository.findById(1L).get(); + FIRST_SAVED_KILLING_PART = killingPartRepository.findById(1L).get(); + SECOND_SAVED_KILLING_PART = killingPartRepository.findById(2L).get(); SAVED_MEMBER = memberRepository.findById(1L).get(); } @@ -42,7 +45,7 @@ void setUp() { @Test void save() { //given - final KillingPartLike killingPartLike = new KillingPartLike(SAVED_KILLING_PART, + final KillingPartLike killingPartLike = new KillingPartLike(FIRST_SAVED_KILLING_PART, SAVED_MEMBER); //when @@ -57,7 +60,7 @@ void save() { @Test void createdAt() { //given - final KillingPartLike killingPartLike = new KillingPartLike(SAVED_KILLING_PART, + final KillingPartLike killingPartLike = new KillingPartLike(FIRST_SAVED_KILLING_PART, SAVED_MEMBER); //when @@ -74,14 +77,14 @@ void createdAt() { @Test void findByKillingPartAndMember_isDeleted() { // given - final KillingPartLike killingPartLike = new KillingPartLike(SAVED_KILLING_PART, + final KillingPartLike killingPartLike = new KillingPartLike(FIRST_SAVED_KILLING_PART, SAVED_MEMBER); killingPartLikeRepository.save(killingPartLike); saveAndClearEntityManager(); // when final Optional foundLike = killingPartLikeRepository.findByKillingPartAndMember( - SAVED_KILLING_PART, SAVED_MEMBER); + FIRST_SAVED_KILLING_PART, SAVED_MEMBER); // then assertThat(foundLike).isPresent(); @@ -91,7 +94,7 @@ void findByKillingPartAndMember_isDeleted() { @Test void findAllByMemberAndDeleted() { // given - final KillingPartLike killingPartLike = new KillingPartLike(SAVED_KILLING_PART, + final KillingPartLike killingPartLike = new KillingPartLike(FIRST_SAVED_KILLING_PART, SAVED_MEMBER); killingPartLikeRepository.save(killingPartLike); @@ -106,4 +109,31 @@ void findAllByMemberAndDeleted() { .comparingOnlyFields("id") .isEqualTo(List.of(killingPartLike)); } + + @DisplayName("좋아요한 노래와 킬링파트 정보를 조회한다.") + @Test + void findLikedKillingPartAndSong() { + //given + final KillingPartLike firstKillingPartLike = new KillingPartLike( + FIRST_SAVED_KILLING_PART, + SAVED_MEMBER + ); + final KillingPartLike secondKillingPartLike = new KillingPartLike( + SECOND_SAVED_KILLING_PART, + SAVED_MEMBER + ); + + firstKillingPartLike.updateDeletion(); + secondKillingPartLike.updateDeletion(); + + killingPartLikeRepository.save(firstKillingPartLike); + killingPartLikeRepository.save(secondKillingPartLike); + + //when + final List likedKillingPartAndSongByMember = + killingPartLikeRepository.findLikedKillingPartAndSongByMember(SAVED_MEMBER); + + //then + assertThat(likedKillingPartAndSongByMember).hasSize(2); + } } diff --git a/backend/src/test/java/shook/shook/song/ui/MyPageControllerTest.java b/backend/src/test/java/shook/shook/song/ui/MyPageControllerTest.java index 073ea37fb..45e01873f 100644 --- a/backend/src/test/java/shook/shook/song/ui/MyPageControllerTest.java +++ b/backend/src/test/java/shook/shook/song/ui/MyPageControllerTest.java @@ -57,7 +57,7 @@ void setUp() { @Nested class GetLikedKillingParts { - @DisplayName("좋요한 킬링파트가 존재할 때. ( 취소한 좋아요가 존재할 때 )") + @DisplayName("좋아요한 킬링파트가 존재할 때. ( 취소한 좋아요가 존재할 때 )") @Test void likedKillingPartExistWithOneDeletedLikeExist() { //given @@ -108,9 +108,9 @@ void likedKillingPartExistWithOneDeletedLikeExist() { //then final List expected = List.of( - LikedKillingPartResponse.of(thirdSong, thirdSongKillingPart.get(0)), + LikedKillingPartResponse.of(firstSong, firstSongKillingPart.get(0)), LikedKillingPartResponse.of(secondSong, secondSongKillingPart.get(0)), - LikedKillingPartResponse.of(firstSong, firstSongKillingPart.get(0)) + LikedKillingPartResponse.of(thirdSong, thirdSongKillingPart.get(0)) ); final List response = RestAssured.given().log().all()