namespace EgwCApp.Core
{
    /// <summary>
    /// Implementazione di riferimento x un file di configurazione x esecuzione task tramite EgwCApp
    /// </summary>
    public class ConfigFile
    {
        #region Public Properties

        /// <summary>
        /// Path Archivio dove depositare file ORIGINALI processati (se !="" vanno archiviati)
        /// </summary>
        public string ArchiveDir { get; set; } = "";

        /// <summary>
        /// Path dove depositare file tradotti processati (se !="" vanno spostati li)
        /// </summary>
        public string ConvertDir { get; set; } = "";

        /// <summary>
        /// Path file da processare
        /// </summary>
        public string FileInPath { get; set; } = "demoIn.txt";

        /// <summary>
        /// Path file dove salvare
        /// </summary>
        public string FileOutPath { get; set; } = "";

        /// <summary>
        /// IdxODL da registrare
        /// </summary>
        public int IdxODL { get; set; } = 0;

        /// <summary>
        /// DataType in output del file da processare (default Record Giacenze Giacovelli)
        /// </summary>
        public OutDataType ReturnDataType { get; set; } = OutDataType.RegGiacenze;

        /// <summary>
        /// Parametri per processing file: indica in quale NUMERO colonna (INT) ci sia un valore
        /// </summary>
        public Dictionary<string, int> ProcessParamInt { get; set; } = new Dictionary<string, int>();

        /// <summary>
        /// Parametri per processing file string --&gt; string
        /// </summary>
        public Dictionary<string, string> ProcessParamStr { get; set; } = new Dictionary<string, string>();

        /// <summary>
        /// DB Redis dove salvare
        /// </summary>
        public int RedisDB { get; set; } = 0;

        /// <summary>
        /// Posizione Redis dove salvare (HashKey)
        /// </summary>
        public string RedisOut { get; set; } = "";

        /// <summary>
        /// Porta Redis salvataggio
        /// </summary>
        public int RedisPort { get; set; } = 6379;

        /// <summary>
        /// Indirizzo Redis server
        /// </summary>
        public string RedisServer { get; set; } = "localhost";

        /// <summary>
        /// Valore TTL chiavi salvate in Redis (secondi)) - 0 = non scade
        /// </summary>
        public int RedisTTL { get; set; } = 0;

        /// <summary>
        /// Modalità ritorno risutlati
        /// </summary>
        public ReturnMode Return { get; set; } = ReturnMode.ND;

        /// <summary>
        /// Path file da processare
        /// </summary>
        public string TargetName { get; set; } = "";

        /// <summary>
        /// Tipologia di iport da condurre
        /// </summary>
        public ImportType Type { get; set; } = ImportType.ND;

        #endregion Public Properties
    }
}