feat(News): refactor news service and add sentiment tracking

This commit is contained in:
2026-08-09 21:01:41 +02:00
parent 605e41cfeb
commit aff831cf58
390 changed files with 115094 additions and 9 deletions
@@ -0,0 +1,47 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace FinlyticNews.Entities;
/// <summary>
/// Entity representing global runtime settings for the FinlyticNews microservice.
/// Persisted in PostgreSQL and updated dynamically via Admin Panel MQTT events.
/// </summary>
public class NewsSettingsEntity
{
/// <summary>
/// Gets or sets the primary key for the settings row.
/// </summary>
[Key]
public Guid Id { get; set; }
/// <summary>
/// Frequency in minutes for polling RSS feed sources.
/// </summary>
public int PollingFrequencyMinutes { get; set; } = 15;
/// <summary>
/// Article retention period in days before archival or cleanup.
/// </summary>
public int ArticleRetentionDays { get; set; } = 90;
/// <summary>
/// Default page size for historical news API pagination queries.
/// </summary>
public int DefaultPageSize { get; set; } = 20;
/// <summary>
/// Background scraper interval in minutes.
/// </summary>
public int ScrapingIntervalMinutes { get; set; } = 15;
/// <summary>
/// Webhook URL for n8n AI article analysis.
/// </summary>
public string N8nWebhookUrl { get; set; } = "http://localhost:5678/webhook/finlytic-news";
/// <summary>
/// Timestamp of last modification.
/// </summary>
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}