package eu.friedcutlet.yokan.services.scheduling import eu.friedcutlet.yokan.domain.ProfileId sealed interface ProfileWorkResult { data class Completed(val value: T) : ProfileWorkResult data object Skipped : ProfileWorkResult data object Retry : ProfileWorkResult } /** Persisted work names stay stable across rename; Default adopts existing WorkManager jobs. */ data class ProfileWorkNamespace(val id: ProfileId) { fun uniqueName(legacyName: String): String = if (id == ProfileId.Default) legacyName else "$legacyName.${id.value}" companion object { const val OwnerKey = "yokan.profile_id" } }