53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace FinlyticSentiment.Entities;
|
|
|
|
/// <summary>
|
|
/// Pre-aggregated, real-time sentiment summary for a company/asset, enabling sub-millisecond lookups without recalculation.
|
|
/// </summary>
|
|
[Table("company_sentiment_summaries")]
|
|
public class CompanySentimentSummaryEntity
|
|
{
|
|
[Key]
|
|
[MaxLength(12)]
|
|
public string Isin { get; set; } = string.Empty;
|
|
|
|
[Required]
|
|
[MaxLength(256)]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[MaxLength(128)]
|
|
public string? Sector { get; set; }
|
|
|
|
[Required]
|
|
[MaxLength(32)]
|
|
public string CurrentLabel { get; set; } = "NEUTRAL";
|
|
|
|
public double AverageScore { get; set; }
|
|
|
|
public double WeightedScore { get; set; }
|
|
|
|
public double AverageConfidence { get; set; }
|
|
|
|
public int TotalAnalysesCount { get; set; }
|
|
|
|
public int PositiveCount { get; set; }
|
|
|
|
public int NegativeCount { get; set; }
|
|
|
|
public int NeutralCount { get; set; }
|
|
|
|
[MaxLength(1024)]
|
|
public string? LatestKeyHighlight { get; set; }
|
|
|
|
[MaxLength(32)]
|
|
public string? Trend { get; set; } = "STABLE";
|
|
|
|
public DateTime LastUpdatedUtc { get; set; } = DateTime.UtcNow;
|
|
|
|
[ConcurrencyCheck]
|
|
public uint Version { get; set; }
|
|
}
|