feat(home): 첫 오디오 콘텐츠 포인트 사용 가능 여부를 응답한다

This commit is contained in:
2026-06-01 21:32:26 +09:00
parent 279053ce7b
commit 4f66b6abb9
4 changed files with 10 additions and 4 deletions

View File

@@ -270,7 +270,8 @@ class HomeRecommendationFacade(
creatorProfileImage = imageUrl(cloudFrontHost, creatorProfileImage),
title = title,
coverImage = imageUrl(cloudFrontHost, coverImage),
releaseDate = releaseDate.toUtcIso()
releaseDate = releaseDate.toUtcIso(),
isPointAvailable = isPointAvailable
)
private fun HomeAiCharacterRecommendationRecord.toItem() = HomeAiCharacterItem(

View File

@@ -66,7 +66,8 @@ data class HomeFirstAudioContentItem(
val creatorProfileImage: String?,
val title: String,
val coverImage: String?,
val releaseDate: String
val releaseDate: String,
val isPointAvailable: Boolean
)
data class HomeAiCharacterItem(

View File

@@ -395,6 +395,7 @@ class DefaultHomeRecommendationQueryRepository(
ac.cover_image as cover_image,
ac.release_date as release_date,
ac.is_active as is_active,
ac.is_point_available as is_point_available,
row_number() over (
partition by ac.member_id
order by ac.created_at asc, ac.release_date asc, ac.id asc
@@ -421,6 +422,7 @@ class DefaultHomeRecommendationQueryRepository(
ec.title as title,
ec.cover_image as cover_image,
ec.release_date as release_date,
ec.is_point_available as is_point_available,
case
when ec.release_date >= :recency3Start then 100
when ec.release_date >= :recency7Start then 80
@@ -471,8 +473,9 @@ class DefaultHomeRecommendationQueryRepository(
title = row[4] as String,
coverImage = row[5] as String?,
releaseDate = toLocalDateTime(row[6]),
recencyScore = (row[7] as Number).toInt(),
randomTieBreaker = (row[8] as Number).toDouble()
isPointAvailable = row[7] as Boolean,
recencyScore = (row[8] as Number).toInt(),
randomTieBreaker = (row[9] as Number).toDouble()
)
}
}

View File

@@ -126,6 +126,7 @@ data class HomeFirstAudioContentRecord(
val title: String,
val coverImage: String?,
val releaseDate: LocalDateTime,
val isPointAvailable: Boolean,
val recencyScore: Int,
val randomTieBreaker: Double
)