using System.ComponentModel.DataAnnotations; namespace FinlyticNews.Entities; /// /// Represents a news article record stored in the database, tracking its lifecycle status and classification details. /// public class NewsArticleEntity { /// /// Gets or sets the unique primary key identifier. /// [Key] public Guid Id { get; set; } /// /// Gets or sets the title of the article. /// [Required] public string Title { get; set; } = string.Empty; /// /// Gets or sets the author of the article. /// public string? Author { get; set; } /// /// Gets or sets a brief summary of the article content. /// public string? Summary { get; set; } /// /// Gets or sets the raw extracted text content. /// [Required] public string ContentRaw { get; set; } = string.Empty; /// /// Gets or sets the language of the article. /// public string? Language { get; set; } /// /// Gets or sets the unique source URL of the article. Used for duplicate checking (idempotency). /// [Required] public string SourceUrl { get; set; } = string.Empty; /// /// Gets or sets the local timestamp when the scraper processed this article. /// public DateTime ScrapedAt { get; set; } /// /// Gets or sets the original publication date of the article. /// public DateTime PublishedAt { get; set; } /// /// Gets or sets the processing lifecycle state (e.g., "Pending", "Processing", "Completed", "Analyzed", "Failed", "Duplicate"). /// [Required] public string Status { get; set; } = "Pending"; /// /// Gets or sets the normalized SHA-256 hash of the cleaned title for duplicate detection. /// [MaxLength(64)] public string? TitleHash { get; set; } /// /// Gets or sets the 64-bit SimHash content fingerprint for fuzzy duplicate text detection. /// public long? SimHash { get; set; } /// /// Gets or sets the list of financial assets matched and associated with this news article. /// public List MatchedAssets { get; set; } = []; }