namespace Predictalytics.Domain.Entities;

/// <summary>
/// Calculated priority and quality score for a trader.
/// Updated periodically by the scoring engine.
/// </summary>
public class TraderScore
{
    public int Id { get; set; }

    /// <summary>Foreign key to trader.</summary>
    public int TraderId { get; set; }

    /// <summary>Activity score: frequency, recency, and consistency of trading (0-100).</summary>
    public decimal ActivityScore { get; set; }

    /// <summary>Quality score: win rate, ROI, risk management quality (0-100).</summary>
    public decimal QualityScore { get; set; }

    /// <summary>Combined weighted score (0-100).</summary>
    public decimal CombinedScore { get; set; }

    /// <summary>Volume score: size of positions relative to market (0-100).</summary>
    public decimal VolumeScore { get; set; }

    /// <summary>Timing score: how well-timed entries and exits are (0-100).</summary>
    public decimal TimingScore { get; set; }

    /// <summary>Overall rank among all tracked traders.</summary>
    public int Rank { get; set; }

    /// <summary>When this score was last calculated.</summary>
    public DateTime CalculatedAt { get; set; } = DateTime.UtcNow;

    // Navigation
    public Trader Trader { get; set; } = null!;
}
