using Managing.Domain.Synth.Models; namespace Managing.Application.Abstractions.Repositories; /// /// Repository interface for Synth-related data operations /// Provides MongoDB persistence for leaderboard and individual predictions data /// public interface ISynthRepository { /// /// Gets cached leaderboard data by cache key /// /// The cache key to search for /// Cached leaderboard data if found, null otherwise Task GetLeaderboardAsync(string cacheKey); /// /// Saves leaderboard data to MongoDB /// /// The leaderboard data to save Task SaveLeaderboardAsync(SynthMinersLeaderboard leaderboard); /// /// Gets individual cached prediction data by asset, parameters, and miner UIDs /// /// Asset symbol /// Time increment in seconds /// Time length in seconds /// List of miner UIDs to get predictions for /// Whether this is backtest data /// Signal date for backtest data /// List of cached individual predictions Task> GetIndividualPredictionsAsync( string asset, int timeIncrement, int timeLength, List minerUids, bool isBacktest, DateTime? signalDate); /// /// Saves individual prediction data to MongoDB /// /// The individual prediction data to save Task SaveIndividualPredictionAsync(SynthPrediction prediction); /// /// Saves multiple individual predictions to MongoDB in batch /// /// The list of individual predictions to save Task SaveIndividualPredictionsAsync(List predictions); /// /// Cleans up old cached data beyond the retention period /// /// Number of days to retain data Task CleanupOldDataAsync(int retentionDays = 30); }