QrRapido/Models/QRCodeHistory.cs
Ricardo Carneiro 2ccd35bb7d
Some checks failed
Deploy QR Rapido / test (push) Successful in 4m58s
Deploy QR Rapido / build-and-push (push) Failing after 1m39s
Deploy QR Rapido / deploy-staging (push) Has been skipped
Deploy QR Rapido / deploy-production (push) Has been skipped
first commit
2025-07-28 11:46:48 -03:00

54 lines
1.6 KiB
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace QRRapidoApp.Models
{
public class QRCodeHistory
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = string.Empty;
[BsonElement("userId")]
public string? UserId { get; set; } // null for anonymous users
[BsonElement("type")]
public string Type { get; set; } = string.Empty; // URL, Text, WiFi, vCard, SMS, Email
[BsonElement("content")]
public string Content { get; set; } = string.Empty;
[BsonElement("qrCodeBase64")]
public string QRCodeBase64 { get; set; } = string.Empty;
[BsonElement("customizationSettings")]
public string CustomizationSettings { get; set; } = string.Empty; // JSON
[BsonElement("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
[BsonElement("language")]
public string Language { get; set; } = "pt-BR";
[BsonElement("scanCount")]
public int ScanCount { get; set; } = 0;
[BsonElement("isDynamic")]
public bool IsDynamic { get; set; } = false;
[BsonElement("size")]
public int Size { get; set; } = 300;
[BsonElement("generationTimeMs")]
public long GenerationTimeMs { get; set; } = 0;
[BsonElement("fromCache")]
public bool FromCache { get; set; } = false;
[BsonElement("isActive")]
public bool IsActive { get; set; } = true;
[BsonElement("lastAccessedAt")]
public DateTime LastAccessedAt { get; set; } = DateTime.UtcNow;
}
}