package io.nexilis.service.data.repositories

import androidx.lifecycle.LiveData
import io.nexilis.service.data.daos.GroupDao
import io.nexilis.service.data.entities.Group
import io.nexilis.service.data.entities.MainEntity
import javax.inject.Inject

class GroupRepository @Inject constructor(private val dao: GroupDao) : Repository {

    val all: LiveData<List<Group>> = dao.getAll()

    override suspend fun insert(entity: MainEntity) {
        dao.insert(entity as Group)
    }
}