feat(creator): 스케줄 성인 노출 정책을 적용한다

This commit is contained in:
2026-06-12 17:23:37 +09:00
parent 6fa7044220
commit abc3e8e9aa
4 changed files with 28 additions and 8 deletions

View File

@@ -68,7 +68,8 @@ data class CreatorChannelSchedule(
val scheduledAt: LocalDateTime,
val title: String,
val type: CreatorActivityType,
val targetId: Long
val targetId: Long,
val isAdult: Boolean
)
data class CreatorChannelSeries(

View File

@@ -6,10 +6,12 @@ import java.time.LocalDateTime
class CreatorChannelHomeQueryPolicy {
fun limitSchedules(
schedules: List<CreatorChannelSchedule>,
now: LocalDateTime
now: LocalDateTime,
canViewAdultContent: Boolean
): List<CreatorChannelSchedule> {
return schedules
.filter { it.scheduledAt > now }
.filter { canViewAdultContent || !it.isAdult }
.sortedWith(compareBy<CreatorChannelSchedule> { it.scheduledAt }.thenBy { it.type.scheduleOrder() })
.take(3)
}