using System.ComponentModel.DataAnnotations;
using Managing.Domain.Candles;
using Managing.Domain.Indicators;
using Managing.Domain.Users;
using static Managing.Common.Enums;

namespace Managing.Domain.Strategies
{
    public class Signal : LightSignal
    {
        public Signal(Ticker ticker, TradeDirection direction, Confidence confidence, Candle candle, DateTime date,
            TradingExchanges exchange, IndicatorType indicatorType, SignalType signalType, string indicatorName,
            User user)
            : base(ticker, direction, confidence, candle, date, exchange, indicatorType, signalType, indicatorName)
        {
            User = user;
        }

        [Required] public SignalStatus Status { get; set; }
        [Required] public TradeDirection Direction { get; }
        [Required] public Confidence Confidence { get; private set; }
        [Required] public Timeframe Timeframe { get; }
        [Required] public DateTime Date { get; private set; }
        [Required] public Candle Candle { get; }
        [Required] public string Identifier { get; }
        [Required] public Ticker Ticker { get; }
        [Required] public TradingExchanges Exchange { get; set; }
        [Required] public IndicatorType IndicatorType { get; set; }
        [Required] public SignalType SignalType { get; set; }
        public User User { get; set; }
        [Required] public string IndicatorName { get; set; }
    }
}