using Managing.Domain.Strategies;
using Managing.Domain.Users;
using Orleans;

namespace Managing.Domain.Scenarios
{
    [GenerateSerializer]
    public class Scenario
    {
        public Scenario(string name, int? loopbackPeriod = 1)
        {
            Name = name;
            Indicators = new List<IndicatorBase>();
            LoopbackPeriod = loopbackPeriod;
        }

        [Id(0)] public string Name { get; set; }

        [Id(1)] public List<IndicatorBase> Indicators { get; set; }

        [Id(2)] public int? LoopbackPeriod { get; set; }

        [Id(3)] public User User { get; set; }

        public void AddIndicator(IndicatorBase indicator)
        {
            Indicators.Add(indicator);
        }
    }
}