QrRapido/Models/AdFreeSession.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

33 lines
989 B
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace QRRapidoApp.Models
{
public class AdFreeSession
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = string.Empty;
[BsonElement("userId")]
public string UserId { get; set; } = string.Empty;
[BsonElement("startedAt")]
public DateTime StartedAt { get; set; } = DateTime.UtcNow;
[BsonElement("expiresAt")]
public DateTime ExpiresAt { get; set; }
[BsonElement("isActive")]
public bool IsActive { get; set; } = true;
[BsonElement("sessionType")]
public string SessionType { get; set; } = "Login"; // "Login", "Premium", "Trial", "Promotion"
[BsonElement("durationMinutes")]
public int DurationMinutes { get; set; } = 43200; // 30 days default
[BsonElement("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
}
}