Skip to content

Commit

Permalink
Merge pull request #422 from Team-Ampersand/412-feat/music-like
Browse files Browse the repository at this point in the history
음악 좋아요 카운트 필드 추가
  • Loading branch information
esperar authored Sep 9, 2024
2 parents e64b7f4 + 3cd7994 commit 54d7230
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ class Music(
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "music_id")
val id: Long = 0,

@Column(name = "music_url", nullable = false)
val url: String,

@Column(name = "music_title", nullable = false)
val title: String,

@Column(name = "music_thumbnail", nullable = false)
val thumbnail: String,

@Column(name = "like_count", nullable = false, columnDefinition = "INT default 0")
val likeCount: Int = 0,

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "member_id", nullable = false)
val member: Member
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import com.dotori.v2.domain.music.presentation.data.req.ApplyMusicReqDto
import com.dotori.v2.domain.music.presentation.data.res.MusicListResDto
import com.dotori.v2.domain.music.presentation.data.res.MusicResDto
import com.dotori.v2.domain.music.service.ApplyMusicService
import com.dotori.v2.domain.student.presentation.data.req.ModifyStudentInfoRequest
import com.dotori.v2.domain.student.presentation.data.res.FindAllStudentResDto
import com.dotori.v2.global.config.redis.service.RedisCacheService
import com.dotori.v2.global.thirdparty.youtube.service.YoutubeService
import com.dotori.v2.global.thirdparty.youtube.data.res.YoutubeResDto
Expand All @@ -32,8 +30,6 @@ class ApplyMusicServiceImpl(
private val redisCacheService: RedisCacheService
) : ApplyMusicService {

val CACHE_KEY = "musicList"

override fun execute(applyMusicReqDto: ApplyMusicReqDto, dayOfWeek: DayOfWeek): Music {
validDayOfWeek(dayOfWeek)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class MusicUtil {
title: String = "title",
thumbnail: String = "thumbnail",
member: Member = MemberUtil.createMember()
) = Music(id, url, title, thumbnail, member)
) = Music(id, url, title, thumbnail, 0 ,member)
}

}

0 comments on commit 54d7230

Please sign in to comment.