48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
|
|
using MongoDB.Bson;
|
|
using MongoDB.Bson.Serialization.Attributes;
|
|
using System.Collections.Generic;
|
|
|
|
namespace QRRapidoApp.Models
|
|
{
|
|
public class Plan
|
|
{
|
|
[BsonId]
|
|
[BsonRepresentation(BsonType.ObjectId)]
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
[BsonElement("name")]
|
|
public Dictionary<string, string> Name { get; set; } = new(); // e.g., {"pt": "Premium Mensal", "en": "Premium Monthly", "es": "Premium Mensual"}
|
|
|
|
[BsonElement("description")]
|
|
public Dictionary<string, string> Description { get; set; } = new(); // Multilingual descriptions
|
|
|
|
[BsonElement("features")]
|
|
public Dictionary<string, List<string>> Features { get; set; } = new(); // Multilingual feature lists
|
|
|
|
[BsonElement("interval")]
|
|
public string Interval { get; set; } = string.Empty; // e.g., "month", "year"
|
|
|
|
[BsonElement("stripePriceId")]
|
|
public string StripePriceId { get; set; } = string.Empty; // Default Price ID
|
|
|
|
[BsonElement("pricesByCountry")]
|
|
public Dictionary<string, PriceInfo> PricesByCountry { get; set; } = new();
|
|
|
|
[BsonElement("isActive")]
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public class PriceInfo
|
|
{
|
|
[BsonElement("amount")]
|
|
public decimal Amount { get; set; }
|
|
|
|
[BsonElement("currency")]
|
|
public string Currency { get; set; } = string.Empty;
|
|
|
|
[BsonElement("stripePriceId")]
|
|
public string StripePriceId { get; set; } = string.Empty;
|
|
}
|
|
}
|