25 lines
994 B
C#
25 lines
994 B
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;
|
|
}
|
|
}
|