using Managing.Domain.Indicators;
using Managing.Domain.Trades;
using Orleans;

namespace Managing.Domain.Bots;

[GenerateSerializer]
public class TradingBotBackup
{
    /// <summary>
    /// The complete trading bot configuration
    /// </summary>
    [Id(0)]
    public TradingBotConfig Config { get; set; }

    /// <summary>
    /// Runtime state: Active signals for the bot
    /// </summary>
    [Id(1)]
    public HashSet<LightSignal> Signals { get; set; }

    /// <summary>
    /// Runtime state: Open and closed positions for the bot, keyed by position identifier
    /// </summary>
    [Id(2)]
    public Dictionary<Guid, Position> Positions { get; set; }

    /// <summary>
    /// Runtime state: Historical wallet balances over time
    /// </summary>
    [Id(3)]
    public Dictionary<DateTime, decimal> WalletBalances { get; set; }

    /// <summary>
    /// Runtime state: When the bot was started
    /// </summary>
    [Id(4)]
    public DateTime StartupTime { get; set; }

    /// <summary>
    /// Runtime state: When the bot was created
    /// </summary>
    [Id(5)]
    public DateTime CreateDate { get; set; }
}