ProfileWork.kt
composeApp/src/commonMain/kotlin/eu/friedcutlet/yokan/services/scheduling/ProfileWork.kt
1package eu.friedcutlet.yokan.services.scheduling23import eu.friedcutlet.yokan.domain.ProfileId45sealed interface ProfileWorkResult<out T> {6 data class Completed<T>(val value: T) : ProfileWorkResult<T>7 data object Skipped : ProfileWorkResult<Nothing>8 data object Retry : ProfileWorkResult<Nothing>9}1011/** Persisted work names stay stable across rename; Default adopts existing WorkManager jobs. */12data class ProfileWorkNamespace(val id: ProfileId) {13 fun uniqueName(legacyName: String): String =14 if (id == ProfileId.Default) legacyName else "$legacyName.${id.value}"1516 companion object { const val OwnerKey = "yokan.profile_id" }17}18