Files

41 lines
1.1 KiB
C#

using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace FinlyticNews.Entities;
/// <summary>
/// Represents a specific financial asset class match linked to a news article.
/// </summary>
public class MatchedAssetEntity
{
/// <summary>
/// Gets or sets the unique primary key identifier.
/// </summary>
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
/// <summary>
/// Gets or sets the foreign key pointing to the associated news article.
/// </summary>
[Required]
public Guid NewsArticleId { get; set; }
/// <summary>
/// Gets or sets the navigation property for the associated news article.
/// </summary>
[JsonIgnore]
public NewsArticleEntity? NewsArticle { get; set; }
/// <summary>
/// Gets or sets the ISIN of the matched asset.
/// </summary>
[Required]
public string Isin { get; set; } = string.Empty;
/// <summary>
/// Gets or sets the matched asset name.
/// </summary>
[Required]
public string Name { get; set; } = string.Empty;
}