package com.example.quiz.data.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import com.example.quiz.data.entity.Logs;

import java.util.List;

@Dao
public interface UserActivityLogDao {

    @Insert
    void insertLog(Logs log);

    @Query(" SELECT * FROM user_activity_logs WHERE date(timestamp / 1000, 'unixepoch', 'localtime') = date('now', 'localtime') ORDER BY timestamp DESC ")
    LiveData<List<Logs>> getTodayLogs();
}
