package io.nexilis.service.data.repositories

import androidx.lifecycle.LiveData
import io.nexilis.service.data.daos.MessageSummaryDao
import io.nexilis.service.data.entities.MainEntity
import io.nexilis.service.data.entities.MessageSummary
import javax.inject.Inject

class MessageSummaryRepository @Inject constructor(private val dao: MessageSummaryDao) :
    Repository {

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

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