using SatelliteProvider.DataAccess.Models;

namespace SatelliteProvider.DataAccess.Repositories;

public interface ITileRepository
{
    Task<TileEntity?> GetByIdAsync(Guid id);
    Task<TileEntity?> GetByTileCoordinatesAsync(int tileZoom, int tileX, int tileY);
    Task<IEnumerable<TileEntity>> GetTilesByRegionAsync(double latitude, double longitude, double sizeMeters, int zoomLevel);
    // AZ-505: bulk-list endpoint backing query. Returns the most-recent row
    // across sources/flights for each requested `location_hash`. Result order
    // is unspecified; callers (TileService.GetInventoryAsync) re-align entries
    // to the request order via dictionary lookup.
    Task<IReadOnlyDictionary<Guid, TileEntity>> GetTilesByLocationHashesAsync(IReadOnlyList<Guid> locationHashes);
    Task<Guid> InsertAsync(TileEntity tile);
    Task<int> UpdateAsync(TileEntity tile);
    Task<int> DeleteAsync(Guid id);
}
