package com.gh.gamecenter.room.dao

import androidx.room.*
import com.gh.gamecenter.entity.HistoryGameDetailEntity

@Dao
interface GameDetailHistoryDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addGame(game: HistoryGameDetailEntity)

    @Query("select * from HistoryGameDetailEntity where id = :id")
    fun getHistoryGameDetailById(id: String): HistoryGameDetailEntity

    @Query("select * from HistoryGameDetailEntity")
    fun getAllHistoryGameDetail(): List<HistoryGameDetailEntity>

    @Delete
    fun deleteGame(game: HistoryGameDetailEntity)
}