package com.example.dtf.repositories.offline

import com.example.dtf.dao.LikeDao
import com.example.dtf.models.Like
import com.example.dtf.repositories.ILikeRepository
import javax.inject.Inject

class OfflineLikeRepository @Inject constructor(
    private val likeDao: LikeDao
) : ILikeRepository {
    override suspend fun insert(like: Like) = likeDao.insert(like)

    override suspend fun delete(like: Like) = likeDao.delete(like)

    override fun countByPost(postId: Int) = likeDao.countByPost(postId)

    override fun isLikedByUser(userId: Int, postId: Int) = likeDao.isLikedByUser(userId, postId)
}