using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson; namespace OnlyOneAccessTemplate.Models { public class ModuleConfig { [BsonId] [BsonRepresentation(BsonType.ObjectId)] 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 Headers { get; set; } = new(); public Dictionary 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 Assets { get; set; } = new(); // Assets adicionais } }