Add backup management
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using Managing.Infrastructure.Databases.MongoDb.Attributes;
|
||||
using Managing.Infrastructure.Databases.MongoDb.Configurations;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.Databases.MongoDb.Collections;
|
||||
|
||||
[BsonCollection("Bots")]
|
||||
public class BotDto : Document
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Data { get; set; }
|
||||
public BotType BotType { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using Managing.Domain.Accounts;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
using Managing.Domain.Accounts;
|
||||
using Managing.Domain.Backtests;
|
||||
using Managing.Domain.Bots;
|
||||
using Managing.Domain.Candles;
|
||||
using Managing.Domain.MoneyManagements;
|
||||
using Managing.Domain.Scenarios;
|
||||
@@ -650,5 +652,29 @@ public static class MongoMappers
|
||||
};
|
||||
}
|
||||
|
||||
internal static BotDto Map(BotBackup bot)
|
||||
{
|
||||
if (bot == null) return null;
|
||||
|
||||
return new BotDto
|
||||
{
|
||||
Name = bot.Name,
|
||||
BotType = bot.BotType,
|
||||
Data = bot.Data,
|
||||
};
|
||||
}
|
||||
|
||||
internal static BotBackup Map(BotDto b)
|
||||
{
|
||||
if (b == null) return null;
|
||||
|
||||
return new BotBackup
|
||||
{
|
||||
Name = b.Name,
|
||||
BotType = b.BotType,
|
||||
Data = b.Data
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user