package com.placeholder.sherpai2.data.local.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.placeholder.sherpai2.data.local.entity.ImageEventEntity

@Dao
interface ImageEventDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun upsert(entity: ImageEventEntity)

    /**
     * Images associated with an event.
     */
    @Query("""
        SELECT imageId FROM image_events
        WHERE eventId = :eventId
    """)
    suspend fun findImagesForEvent(eventId: String): List<String>
}
