package com.gestoreasy.repository

import com.gestoreasy.database.dao.CheckInDao
import com.gestoreasy.database.entities.CheckIn
import kotlinx.coroutines.flow.Flow

class CheckInRepository(private val checkInDao: CheckInDao) {
    suspend fun insert(checkIn: CheckIn): Long {
        return checkInDao.insert(checkIn)
    }
    
    suspend fun getByClient(clientId: Long): List<CheckIn> {
        return checkInDao.getByClient(clientId)
    }
    
    suspend fun getPendingSync(): List<CheckIn> {
        return checkInDao.getPendingSync()
    }
    
    suspend fun markAsSynced(id: Long) {
        checkInDao.markAsSynced(id)
    }
    
    fun getAllFlow(): Flow<List<CheckIn>> {
        return checkInDao.getAllFlow()
    }
}

