using System;
using System.ComponentModel.DataAnnotations;
using FinlyticAssets.Models;
using FinlyticCore.Models.Assets;
namespace FinlyticAssets.Entities;
///
/// Represents the global synchronization and timing configurations for the Trade Republic asset scanner.
///
public class Settings
{
///
/// Gets or sets the unique identifier for the settings record.
///
[Key]
public Guid Id { get; set; }
///
/// Gets or sets a value indicating whether the very first full scan of all assets has been completed.
/// Used to switch from fast initial discovery delays to stealthy incremental update delays.
///
public bool FinishedInitialScan { get; set; }
///
/// Gets or sets the maximum number of assets requested per single API pagination call.
/// Values around 100 look like standard dynamic-scrolling payloads from a real client device.
///
public int TradeRepublicMaxRequestPageSize { get; set; } = 100;
///
/// Gets or sets the idle delay in seconds between switching from one full asset category to another (e.g., from Stocks to Crypto)
/// during standard maintenance mode. (Default 12000s = ~3.3 hours).
///
public int AssetUpdateTypeDelay { get; set; } = 12000;
///
/// Gets or sets the idle delay in seconds between switching asset categories during the initial setup scan.
/// Set to 0 to move immediately to the next type after finishing the current one. (Default 0s).
///
public int InitAssetUpdateTypeDelay { get; set; } = 0;
///
/// Gets or sets the baseline delay in seconds between sequential page requests of the same asset type during the initial setup scan.
/// (Default 120s = 2 minutes).
///
public int InitBatchAssetUpdateDelay { get; set; } = 120;
///
/// Gets or sets the standard baseline delay in seconds between sequential page requests of the same asset type during recurring incremental updates.
/// Spreads pagination widely over time to blend into regular human traffic profiles. (Default 600s = 10 minutes).
///
public int BatchAssetUpdateDelay { get; set; } = 600;
///
/// Gets or sets the asset type that is currently being processed by the full scan.
/// Acts as a live pointer for recovery after a service interruption.
///
public AssetType CurrentScanningType { get; set; } = AssetType.Stock;
///
/// Gets or sets the page number of the that is currently being fetched or was just processed.
/// Trade Republic uses 1-based pagination. A value of 0 means the scan is currently idle or between types.
///
public int CurrentScanningPage { get; set; } = 0;
}