38 lines
1.5 KiB
C#
38 lines
1.5 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FinlyticTechnicals.Entities;
|
|
|
|
/// <summary>
|
|
/// Persisted backing store for <c>TechnicalUniverseManager</c>'s continuously-scanned asset universe (one row
|
|
/// per monitored ISIN). Deliberately NOT meant to survive a service restart - <c>Program.cs</c> clears this
|
|
/// table on every startup, since the universe is fully rebuilt within minutes from
|
|
/// <c>RefreshFavoritesAsync</c>/<c>RefreshDiscoveryAsync</c> and fresh sentiment-spike events, and a stale row
|
|
/// that never got TTL-swept because the process was down is worse than starting from an empty universe.
|
|
/// </summary>
|
|
[Table("fta_monitored_universe_assets")]
|
|
public class FtaMonitoredUniverseAssetEntity
|
|
{
|
|
[Key]
|
|
[MaxLength(20)]
|
|
public string Isin { get; set; } = string.Empty;
|
|
|
|
[MaxLength(30)]
|
|
public string? Symbol { get; set; }
|
|
|
|
/// <summary>String form of <c>FinlyticCore.Dtos.TechnicalAnalysis.UniverseSource</c>.</summary>
|
|
[Required]
|
|
[MaxLength(20)]
|
|
public string Source { get; set; } = string.Empty;
|
|
|
|
/// <summary>Lower value = higher scan priority (SentimentSpike=1, UserFavorite=2, Discovery=3).</summary>
|
|
public int Priority { get; set; }
|
|
|
|
[Required]
|
|
public DateTime AddedAtUtc { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary><see langword="null"/> for favorites/discovery entries, which never expire by TTL.</summary>
|
|
public DateTime? ExpiresAtUtc { get; set; }
|
|
}
|