using BCards.Web.Models; namespace BCards.Web.Services; public interface IPlanConfigurationService { /// /// Mapeia um PriceId do Stripe para o PlanType correspondente /// PlanType GetPlanTypeFromPriceId(string priceId); /// /// Mapeia um PriceId do Stripe para o nome string do plano /// string GetPlanNameFromPriceId(string priceId); /// /// Obtém as limitações de um plano baseado no PlanType /// PlanLimitations GetPlanLimitations(PlanType planType); /// /// Obtém o PriceId de um plano (mensal por padrão) /// string GetPriceId(PlanType planType, bool yearly = false); /// /// Obtém o preço de um plano /// decimal GetPlanPrice(PlanType planType, bool yearly = false); /// /// Verifica se um plano é anual baseado no PriceId /// bool IsYearlyPlan(string priceId); /// /// Obtém todas as configurações de um plano pelo nome da seção /// PlanConfiguration? GetPlanConfiguration(string planSectionName); } public class PlanConfiguration { public string Name { get; set; } = string.Empty; public string PriceId { get; set; } = string.Empty; public decimal Price { get; set; } public int MaxPages { get; set; } public int MaxLinks { get; set; } public bool AllowPremiumThemes { get; set; } public bool AllowProductLinks { get; set; } public bool AllowAnalytics { get; set; } public bool? SpecialModeration { get; set; } public List Features { get; set; } = new(); public string Interval { get; set; } = "month"; public PlanType BasePlanType { get; set; } }