package io.nexilis.service.data.repositories

import androidx.lifecycle.LiveData
import io.nexilis.service.data.daos.LinkPreviewDao
import io.nexilis.service.data.entities.LinkPreview
import io.nexilis.service.data.entities.MainEntity
import javax.inject.Inject

class LinkPreviewRepository @Inject constructor(private val dao: LinkPreviewDao) : Repository {

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

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