OneConversorTemplate/OnlyOneAccessTemplate/Models/ModuleConfig.cs
2025-06-08 18:00:23 -03:00

30 lines
1.3 KiB
C#

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<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
}
}