Skip to content

Instantly share code, notes, and snippets.

@igorescodro
Created October 16, 2023 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save igorescodro/19efb21e23da22b6ae1f64e99834c389 to your computer and use it in GitHub Desktop.
Save igorescodro/19efb21e23da22b6ae1f64e99834c389 to your computer and use it in GitHub Desktop.
@TypeConverter
fun toAlarmInterval(id: Int?): AlarmInterval? =
AlarmInterval.values().find { it.id == id }
@TypeConverter
fun toId(alarmInterval: AlarmInterval?): Int? =
alarmInterval?.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment