namespace Predictalytics.Domain.Entities;

/// <summary>
/// Represents a single tradeable outcome within a market.
/// For example, "Yes" and "No" on a binary market, or named outcomes on a multi-outcome market.
/// The TokenId (clobTokenId on Polymarket) is the key link between trades and outcomes.
/// </summary>
public class MarketOutcome
{
    public int Id { get; set; }

    /// <summary>Foreign key to the parent market.</summary>
    public int MarketId { get; set; }

    /// <summary>Human-readable outcome label (e.g. "Yes", "No", "Trump", "Biden").</summary>
    public string Label { get; set; } = string.Empty;

    /// <summary>Positional index of this outcome within the market (0-based).</summary>
    public int OutcomeIndex { get; set; }

    /// <summary>
    /// Platform-specific token identifier for this outcome.
    /// On Polymarket this is the clobTokenId — the key used in trade asset_id fields.
    /// </summary>
    public string TokenId { get; set; } = string.Empty;

    /// <summary>Current price of this outcome (0.00 to 1.00).</summary>
    public decimal CurrentPrice { get; set; }

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