package com.example.timert.data.repository

import androidx.lifecycle.LiveData
import com.example.timert.com.example.timert.data.dao.WorkoutDao
import com.example.timert.com.example.timert.data.entity.Workout

class WorkoutRepository (private val workoutDao: WorkoutDao){
    val allWorkout: LiveData<List<Workout>> = workoutDao.getAllWorkouts()
    suspend fun insert(workout: Workout) {
        workoutDao.insertWorkout(workout)
    }

    suspend fun deleteWorkoutById(id: Int) {
        workoutDao.deleteById(id)
    }

}