Refactor pagination sorting parameters across multiple controllers and services to use the new SortDirection enum; update related API models and TypeScript definitions for consistency. Fix minor documentation and naming inconsistencies in the Bot and Data controllers.
This commit is contained in:
@@ -360,7 +360,9 @@ public static class PostgreSqlMappers
|
||||
Duration = backtest.EndDate - backtest.StartDate,
|
||||
MoneyManagementJson = JsonConvert.SerializeObject(backtest.Config?.MoneyManagement, jsonSettings),
|
||||
UserId = backtest.User?.Id ?? 0,
|
||||
StatisticsJson = backtest.Statistics != null ? JsonConvert.SerializeObject(backtest.Statistics, jsonSettings) : null,
|
||||
StatisticsJson = backtest.Statistics != null
|
||||
? JsonConvert.SerializeObject(backtest.Statistics, jsonSettings)
|
||||
: null,
|
||||
SharpeRatio = backtest.Statistics?.SharpeRatio ?? 0m,
|
||||
MaxDrawdown = backtest.Statistics?.MaxDrawdown ?? 0m,
|
||||
MaxDrawdownRecoveryTime = backtest.Statistics?.MaxDrawdownRecoveryTime ?? TimeSpan.Zero,
|
||||
@@ -503,7 +505,7 @@ public static class PostgreSqlMappers
|
||||
return new ScenarioEntity
|
||||
{
|
||||
Name = scenario.Name,
|
||||
LoopbackPeriod = scenario.LoopbackPeriod ?? 1,
|
||||
LoopbackPeriod = scenario.LookbackPeriod,
|
||||
UserId = scenario.User?.Id ?? 0
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user