You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
548 B

package net.aiterp.git.ykonsole2.domain.models
interface WorkoutRepository {
/**
* Fetch a [Workout] by its [id], if it exists.
*/
fun findById(id: String): Workout?
/**
* Fetch all workouts, regardless of status.
*/
fun fetchAll(): List<Workout>
/**
* Fetch the latest [Workout] that hasn't been finished (disconnected).
*/
fun findActive(): Workout?
/**
* Persist a [Workout] to storage.
*/
fun save(workout: Workout)
/**
* Remove a [Workout] from storage.
*/
fun delete(workout: Workout)
}