refactor(dotnet): separate collection read model service
Validators (Pushes and Pull Requests) / validate-ui-and-storage (push) Successful in 16s
Validators (Pushes and Pull Requests) / validate-core (push) Successful in 2m3s

This commit is contained in:
2026-07-13 00:44:43 +09:00
parent d610ecb57c
commit bccefed35e
6 changed files with 70 additions and 33 deletions
@@ -0,0 +1,21 @@
using QuantEngine.Application.Interfaces;
using QuantEngine.Core.Interfaces;
namespace QuantEngine.Application.Services;
public sealed class CollectionReadModelService : ICollectionReadModelService
{
private readonly ICollectionRepository _repository;
public CollectionReadModelService(ICollectionRepository repository)
{
_repository = repository;
}
public Task<CollectionDashboardStateRecord> GetDashboardStateAsync() => _repository.GetDashboardStateAsync();
public Task<List<CollectionRunRecord>> GetRecentRunsAsync(int limit = 20) => _repository.GetRecentRunsAsync(limit);
public Task<List<CollectionSnapshotRecord>> GetRunSnapshotsAsync(string runId) => _repository.GetRunSnapshotsAsync(runId);
public Task<List<CollectionErrorRecord>> GetRunErrorsAsync(string runId, int limit = 50) => _repository.GetRunErrorsAsync(runId, limit);
public Task<List<CollectionSnapshotRecord>> GetLatestSnapshotsForTickerAsync(string ticker, int limit = 10) => _repository.GetLatestSnapshotsForTickerAsync(ticker, limit);
public Task<List<PriceHistorySummaryRecord>> GetPriceHistorySummaryAsync() => _repository.GetPriceHistorySummaryAsync();
}