refactor(dotnet): split collection read and write contracts
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 17s
Validators (Pushes and Pull Requests) / validate-core (push) Has been cancelled

This commit is contained in:
2026-07-13 01:00:36 +09:00
parent e99c15e6a5
commit e0d278e6eb
6 changed files with 72 additions and 39 deletions
@@ -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>