
namespace OnlyOneAccessTemplate.Models
{
    public class ModuleConfig
    {
        public string Id { get; set; } = string.Empty;

        public string ModuleId { get; set; } = string.Empty; // Ex: "footer-message"
        public string Name { get; set; } = string.Empty;
        public string Url { get; set; } = string.Empty; // URL do endpoint externo
        public string RequestBy { get; set; } = string.Empty; // Identificador único
        public bool IsActive { get; set; } = true;
        public Dictionary<string, string> Headers { get; set; } = new();
        public Dictionary<string, object> Parameters { get; set; } = new();
        public int CacheMinutes { get; set; } = 5; // Cache do conteúdo

        public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
        public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

        public string? JavaScriptUrl { get; set; } // URL do arquivo JS
        public string? JavaScriptFunction { get; set; } // Função de inicialização
        public string? CssUrl { get; set; } // CSS opcional
        public Dictionary<string, string> Assets { get; set; } = new(); // Assets adicionais
    }
}
