Update AgentSummaryRepository to clarify BacktestCount management

- Added comments to indicate that BacktestCount is not updated directly in the entity, as it is managed independently via IncrementBacktestCountAsync. This change prevents other update operations from overwriting the BacktestCount, ensuring data integrity.
This commit is contained in:
2026-01-09 04:27:58 +07:00
parent c4204f7264
commit 1d33c6c2ee

View File

@@ -276,7 +276,8 @@ public class AgentSummaryRepository : IAgentSummaryRepository
entity.TotalVolume = domain.TotalVolume; entity.TotalVolume = domain.TotalVolume;
entity.TotalBalance = domain.TotalBalance; entity.TotalBalance = domain.TotalBalance;
entity.TotalFees = domain.TotalFees; entity.TotalFees = domain.TotalFees;
entity.BacktestCount = domain.BacktestCount; // BacktestCount is NOT updated here - it's managed independently via IncrementBacktestCountAsync
// This prevents other update operations from overwriting the BacktestCount
} }
private static AgentSummary MapToDomain(AgentSummaryEntity entity) private static AgentSummary MapToDomain(AgentSummaryEntity entity)