using System;
using System.ComponentModel.DataAnnotations;
namespace FinlyticNews.Entities;
///
/// Entity representing global runtime settings for the FinlyticNews microservice.
/// Persisted in PostgreSQL and updated dynamically via Admin Panel MQTT events.
///
public class NewsSettingsEntity
{
///
/// Gets or sets the primary key for the settings row.
///
[Key]
public Guid Id { get; set; }
///
/// Frequency in minutes for polling RSS feed sources.
///
public int PollingFrequencyMinutes { get; set; } = 15;
///
/// Article retention period in days before archival or cleanup.
///
public int ArticleRetentionDays { get; set; } = 90;
///
/// Default page size for historical news API pagination queries.
///
public int DefaultPageSize { get; set; } = 20;
///
/// Background scraper interval in minutes.
///
public int ScrapingIntervalMinutes { get; set; } = 15;
///
/// Webhook URL for n8n AI article analysis.
///
public string N8nWebhookUrl { get; set; } = "http://localhost:5678/webhook/finlytic-news";
///
/// Timestamp of last modification.
///
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}