Add MasterBotUserId and MasterAgentName for copy trading support
- Introduced MasterBotUserId and MasterAgentName properties to facilitate copy trading functionality. - Updated relevant models, controllers, and database entities to accommodate these new properties. - Enhanced validation logic in StartCopyTradingCommandHandler to ensure proper ownership checks for master strategies.
This commit is contained in:
@@ -27,6 +27,16 @@ namespace Managing.Domain.Bots
|
||||
public decimal Fees { get; set; }
|
||||
public int LongPositionCount { get; set; }
|
||||
public int ShortPositionCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user ID of the master bot's owner when this bot is for copy trading
|
||||
/// </summary>
|
||||
public int? MasterBotUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user object of the master bot's owner when this bot is for copy trading
|
||||
/// </summary>
|
||||
public User MasterBotUser { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total runtime in seconds, including the current session if the bot is running
|
||||
|
||||
@@ -115,4 +115,10 @@ public class TradingBotConfig
|
||||
/// </summary>
|
||||
[Id(22)]
|
||||
public Guid? MasterBotIdentifier { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The user ID of the master bot's owner when IsForCopyTrading is true
|
||||
/// </summary>
|
||||
[Id(23)]
|
||||
public int? MasterBotUserId { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user