BCards/src/BCards.Web/Models/Subscription.cs
2025-06-24 23:25:02 -03:00

57 lines
1.6 KiB
C#

using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace BCards.Web.Models;
public class Subscription
{
[BsonId]
[BsonRepresentation(BsonType.ObjectId)]
public string Id { get; set; } = string.Empty;
[BsonElement("userId")]
[BsonRepresentation(BsonType.ObjectId)]
public string UserId { get; set; } = string.Empty;
[BsonElement("stripeSubscriptionId")]
public string StripeSubscriptionId { get; set; } = string.Empty;
[BsonElement("planType")]
public string PlanType { get; set; } = "free";
[BsonElement("status")]
public string Status { get; set; } = "active";
[BsonElement("currentPeriodStart")]
public DateTime CurrentPeriodStart { get; set; }
[BsonElement("currentPeriodEnd")]
public DateTime CurrentPeriodEnd { get; set; }
[BsonElement("cancelAtPeriodEnd")]
public bool CancelAtPeriodEnd { get; set; } = false;
[BsonElement("maxLinks")]
public int MaxLinks { get; set; } = 5;
[BsonElement("allowCustomThemes")]
public bool AllowCustomThemes { get; set; } = false;
[BsonElement("allowAnalytics")]
public bool AllowAnalytics { get; set; } = false;
[BsonElement("allowCustomDomain")]
public bool AllowCustomDomain { get; set; } = false;
[BsonElement("allowMultipleDomains")]
public bool AllowMultipleDomains { get; set; } = false;
[BsonElement("prioritySupport")]
public bool PrioritySupport { get; set; } = false;
[BsonElement("createdAt")]
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
[BsonElement("updatedAt")]
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}