feat(recommend): 크리에이터 데뷔 판정 정책을 추가한다

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
2026-05-30 17:45:06 +09:00
parent eecff03d4b
commit 9a8172ab8b
2 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
package kr.co.vividnext.sodalive.v2.recommend.domain
import java.time.LocalDateTime
import java.time.temporal.ChronoUnit
class CreatorDebutPolicy {
fun resolveDebutAt(firstContentPublishedAt: LocalDateTime?, firstLiveAt: LocalDateTime?): LocalDateTime? {
return listOfNotNull(firstContentPublishedAt, firstLiveAt).minOrNull()
}
fun isNewCreator(debutAt: LocalDateTime?, now: LocalDateTime): Boolean {
if (debutAt == null) {
return false
}
val days = ChronoUnit.DAYS.between(debutAt.toLocalDate(), now.toLocalDate())
return days in 0..30
}
}