Add netpnl and initialBalance to backtests
This commit is contained in:
@@ -120,4 +120,12 @@ public class BacktestEntity
|
||||
|
||||
[Required]
|
||||
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[Required]
|
||||
[Column(TypeName = "decimal(18,8)")]
|
||||
public decimal InitialBalance { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column(TypeName = "decimal(18,8)")]
|
||||
public decimal NetPnl { get; set; }
|
||||
}
|
||||
@@ -313,7 +313,9 @@ public static class PostgreSqlMappers
|
||||
Score = entity.Score,
|
||||
ScoreMessage = entity.ScoreMessage,
|
||||
RequestId = entity.RequestId,
|
||||
Metadata = entity.Metadata
|
||||
Metadata = entity.Metadata,
|
||||
InitialBalance = entity.InitialBalance,
|
||||
NetPnl = entity.NetPnl
|
||||
};
|
||||
|
||||
return backtest;
|
||||
@@ -353,7 +355,9 @@ public static class PostgreSqlMappers
|
||||
ScoreMessage = backtest.ScoreMessage ?? string.Empty,
|
||||
Metadata = backtest.Metadata?.ToString(),
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
UpdatedAt = DateTime.UtcNow
|
||||
UpdatedAt = DateTime.UtcNow,
|
||||
InitialBalance = backtest.InitialBalance,
|
||||
NetPnl = backtest.NetPnl
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user