Refactoring TradingBotBase.cs + clean architecture (#38)
* Refactoring TradingBotBase.cs + clean architecture * Fix basic tests * Fix tests * Fix workers * Fix open positions * Fix closing position stucking the grain * Fix comments * Refactor candle handling to use IReadOnlyList for chronological order preservation across various components
This commit is contained in:
@@ -372,6 +372,8 @@ namespace Managing.Infrastructure.Databases.Migrations
|
||||
b.HasIndex("Identifier")
|
||||
.IsUnique();
|
||||
|
||||
b.HasIndex("MasterBotUserId");
|
||||
|
||||
b.HasIndex("Status");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
@@ -929,6 +931,9 @@ namespace Managing.Infrastructure.Databases.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.Property<int>("TradingType")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<decimal>("UiFees")
|
||||
.HasColumnType("decimal(18,8)");
|
||||
|
||||
@@ -1571,12 +1576,19 @@ namespace Managing.Infrastructure.Databases.Migrations
|
||||
|
||||
modelBuilder.Entity("Managing.Infrastructure.Databases.PostgreSql.Entities.BotEntity", b =>
|
||||
{
|
||||
b.HasOne("Managing.Infrastructure.Databases.PostgreSql.Entities.UserEntity", "MasterBotUser")
|
||||
.WithMany()
|
||||
.HasForeignKey("MasterBotUserId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("Managing.Infrastructure.Databases.PostgreSql.Entities.UserEntity", "User")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.SetNull)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("MasterBotUser");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user