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

60 lines
1.9 KiB
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace QRRapidoApp.Models
{
public class User
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = string.Empty;
[BsonElement("email")]
public string Email { get; set; } = string.Empty;
[BsonElement("name")]
public string Name { get; set; } = string.Empty;
[BsonElement("provider")]
public string Provider { get; set; } = string.Empty; // Google, Microsoft
[BsonElement("providerId")]
public string ProviderId { get; set; } = string.Empty;
[BsonElement("isPremium")]
public bool IsPremium { get; set; } = false;
[BsonElement("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
[BsonElement("premiumExpiresAt")]
public DateTime? PremiumExpiresAt { get; set; }
[BsonElement("premiumCancelledAt")]
public DateTime? PremiumCancelledAt { get; set; } // ADICIONADO: Data do cancelamento
[BsonElement("lastLoginAt")]
public DateTime LastLoginAt { get; set; } = DateTime.UtcNow;
[BsonElement("qrHistoryIds")]
public List<string> QRHistoryIds { get; set; } = new();
[BsonElement("stripeCustomerId")]
public string? StripeCustomerId { get; set; }
[BsonElement("stripeSubscriptionId")]
public string? StripeSubscriptionId { get; set; }
[BsonElement("preferredLanguage")]
public string PreferredLanguage { get; set; } = "pt-BR";
[BsonElement("dailyQRCount")]
public int DailyQRCount { get; set; } = 0;
[BsonElement("lastQRDate")]
public DateTime LastQRDate { get; set; } = DateTime.UtcNow.Date;
[BsonElement("totalQRGenerated")]
public int TotalQRGenerated { get; set; } = 0;
}
}