Initial commit: Predictalytics solution
Clean Architecture .NET 8 solution (Domain/Application/Infrastructure/Api/Worker/WinFormsHost) for analyzing Polymarket traders for copytrading/strategy-replication candidates. Includes EF Core InitialBaseline migration and DB secrets removed from source/config in preparation for version control.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Domain.Entities;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a prediction market (event/question).
|
||||
/// </summary>
|
||||
public class Market
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>Platform this market belongs to.</summary>
|
||||
public PlatformType Platform { get; set; }
|
||||
|
||||
/// <summary>Platform-specific market identifier (conditionId on Polymarket).</summary>
|
||||
public string PlatformMarketId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>URL-friendly slug for the market.</summary>
|
||||
public string MarketSlug { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>URL-friendly slug for the parent event.</summary>
|
||||
public string EventSlug { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Detailed market description / resolution criteria.</summary>
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>Market image URL.</summary>
|
||||
public string? ImageUrl { get; set; }
|
||||
|
||||
/// <summary>The question being predicted.</summary>
|
||||
public string Question { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Category / tag (e.g. "Politics", "Crypto", "Sports").</summary>
|
||||
public string Category { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Current total volume traded.</summary>
|
||||
public decimal Volume { get; set; }
|
||||
|
||||
/// <summary>Current liquidity.</summary>
|
||||
public decimal Liquidity { get; set; }
|
||||
|
||||
/// <summary>The time when trading opened for this market.</summary>
|
||||
public DateTime? StartDate { get; set; }
|
||||
|
||||
/// <summary>When the market closes / resolves.</summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>Whether the market has been resolved.</summary>
|
||||
public bool IsResolved { get; set; }
|
||||
|
||||
/// <summary>Resolution outcome (if resolved).</summary>
|
||||
public string? ResolutionOutcome { get; set; }
|
||||
|
||||
/// <summary>When this market was created on the platform.</summary>
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
/// <summary>When this record was first saved to our database.</summary>
|
||||
public DateTime DbCreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
/// <summary>Last time market data was refreshed.</summary>
|
||||
public DateTime? LastUpdatedAt { get; set; }
|
||||
|
||||
/// <summary>Last time market trades were polled for trader discovery.</summary>
|
||||
public DateTime? LastTradesUpdatedAt { get; set; }
|
||||
|
||||
// Navigation
|
||||
public ICollection<MarketOutcome> Outcomes { get; set; } = new List<MarketOutcome>();
|
||||
public virtual MarketAnalytics? Analytics { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user