package io.nexilis.service.data.repositories

import androidx.lifecycle.LiveData
import io.nexilis.service.data.daos.DiscussionForumDao
import io.nexilis.service.data.entities.DiscussionForum
import io.nexilis.service.data.entities.MainEntity
import javax.inject.Inject

class DiscussionForumRepository @Inject constructor(private val dao: DiscussionForumDao) :
    Repository {

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

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