refactor(dotnet): split collection read and write contracts
This commit is contained in:
@@ -44,6 +44,25 @@ public interface IDataCollectionStore
|
||||
Task<CollectionDashboardStateRecord> GetDashboardStateAsync();
|
||||
}
|
||||
|
||||
public interface ICollectionWriteRepository
|
||||
{
|
||||
Task SaveRunAsync(CollectionRunRecord run);
|
||||
Task UpdateRunStatusAsync(string runId, string status, string? finishedAt = null, int? totalSnapshots = null, int? totalErrors = null);
|
||||
Task SaveSnapshotAsync(CollectionSnapshotRecord snapshot);
|
||||
Task SaveErrorAsync(CollectionErrorRecord error);
|
||||
Task SavePriceHistoryDailyAsync(PriceHistoryDailyRecord record);
|
||||
}
|
||||
|
||||
public interface ICollectionReadRepository
|
||||
{
|
||||
Task<List<CollectionRunRecord>> GetRecentRunsAsync(int limit = 20);
|
||||
Task<List<CollectionSnapshotRecord>> GetRunSnapshotsAsync(string runId);
|
||||
Task<List<CollectionErrorRecord>> GetRunErrorsAsync(string runId, int limit = 50);
|
||||
Task<CollectionDashboardStateRecord> GetDashboardStateAsync();
|
||||
Task<List<CollectionSnapshotRecord>> GetLatestSnapshotsForTickerAsync(string ticker, int limit = 10);
|
||||
Task<List<PriceHistorySummaryRecord>> GetPriceHistorySummaryAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Collection run record (maps Python CollectionRun).
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user