using ErrorOr;
using MuiCharts.Domain.Models;
namespace MuiCharts.Domain.Repositories;
///
/// Represents a repository for managing tracks.
///
public interface ITrackRepository
{
///
/// Adds a new track asynchronously.
///
/// The track to add.
/// A task that represents the asynchronous operation. The task result contains the added track if successful, or an error if unsuccessful.
Task> AddTrackAsync(Track track);
///
/// Retrieves a track asynchronously based on the specified IDs.
///
/// The first ID.
/// The second ID.
/// A task that represents the asynchronous operation. The task result contains the retrieved track if successful, or an error if unsuccessful.
Task> GetTrackAsync(int firstId, int secondId);
///
/// Retrieves a range of tracks asynchronously.
///
/// A task that represents the asynchronous operation. The task result contains the range of tracks.
Task> GetTracksRangeAsync();
///
/// Adds or updates a track asynchronously.
///
/// The track to add or update.
/// A task that represents the asynchronous operation. The task result contains the added or updated track if successful, or an error if unsuccessful.
Task> AddOrUpdateTrackAsync(Track track);
///
/// Deletes a track asynchronously based on the specified IDs.
///
/// The first ID.
/// The second ID.
/// A task that represents the asynchronous operation. The task result contains the deletion status if successful, or an error if unsuccessful.
Task> DeleteTrackAsync(int firstId, int secondId);
}