feat: postgres history-first 계약과 적재 경로 추가
- PostgreSQL history contract와 schema/validator를 추가했습니다. - .NET history store, snapshot reader, repository, migration을 연결했습니다. - history-first 운영 모델 문서와 daily signal tracking 문구를 정리했습니다.
This commit is contained in:
@@ -9,10 +9,12 @@ namespace QuantEngine.Application.Services
|
||||
public class WorkspaceService
|
||||
{
|
||||
private readonly IWorkspaceRepository _repository;
|
||||
private readonly IPostgresqlHistoryStore _historyStore;
|
||||
|
||||
public WorkspaceService(IWorkspaceRepository repository)
|
||||
public WorkspaceService(IWorkspaceRepository repository, IPostgresqlHistoryStore historyStore)
|
||||
{
|
||||
_repository = repository;
|
||||
_historyStore = historyStore;
|
||||
}
|
||||
|
||||
public Task<IEnumerable<Setting>> GetSettingsAsync() => _repository.GetSettingsAsync();
|
||||
@@ -23,5 +25,8 @@ namespace QuantEngine.Application.Services
|
||||
public Task<IEnumerable<AccountSnapshot>> GetAccountSnapshotsAsync() => _repository.GetAccountSnapshotsAsync();
|
||||
public Task<bool> InsertAccountSnapshotsAsync(IEnumerable<AccountSnapshot> snapshots) => _repository.InsertAccountSnapshotsAsync(snapshots);
|
||||
public Task<bool> ClearAccountSnapshotsAsync() => _repository.ClearAccountSnapshotsAsync();
|
||||
|
||||
public Task<int> AppendHistoryAsync(string domain, IDictionary<string, object?> payload) => _historyStore.AppendAsync(domain, payload);
|
||||
public Task<IReadOnlyList<IDictionary<string, object?>>> ReadHistorySnapshotAsync(string domain, int limit = 500) => _historyStore.SnapshotAsync(domain, limit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user