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:
@@ -548,6 +548,12 @@ public class ManagingDbContext : DbContext
|
||||
.WithMany()
|
||||
.HasForeignKey(e => e.UserId)
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
// Configure relationship with MasterBotUser
|
||||
entity.HasOne(e => e.MasterBotUser)
|
||||
.WithMany()
|
||||
.HasForeignKey(e => e.MasterBotUserId)
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
});
|
||||
|
||||
// Configure MoneyManagement entity
|
||||
|
||||
Reference in New Issue
Block a user