namespace PowderCoating.Core.Entities;
///
/// Stores plan limits and pricing in the database so SuperAdmins can edit without a code deploy.
/// Global (not per-company). CompanyId is set to 0 / unused. No tenant query filter applied.
/// The Plan integer is the identifier that links Company.SubscriptionPlan to a config row.
///
public class SubscriptionPlanConfig : BaseEntity
{
public int Plan { get; set; }
public string DisplayName { get; set; } = string.Empty;
public string? Description { get; set; }
/// -1 = unlimited
public int MaxUsers { get; set; }
/// -1 = unlimited
public int MaxActiveJobs { get; set; }
/// -1 = unlimited
public int MaxCustomers { get; set; }
/// -1 = unlimited. Counts active (non-terminal) quotes.
public int MaxQuotes { get; set; } = -1;
/// -1 = unlimited. Counts total non-deleted catalog items.
public int MaxCatalogItems { get; set; } = -1;
/// -1 = unlimited. Max job photos per job.
public int MaxJobPhotos { get; set; } = -1;
/// -1 = unlimited. Max general (non-AI) photos per quote.
public int MaxQuotePhotos { get; set; } = -1;
/// -1 = unlimited. 0 = AI photo quotes disabled for this plan. Monthly limit per company.
public int MaxAiPhotoQuotesPerMonth { get; set; } = -1;
public decimal MonthlyPrice { get; set; }
public decimal AnnualPrice { get; set; }
public string? StripePriceIdMonthly { get; set; }
public string? StripePriceIdAnnual { get; set; }
/// When true, companies on this plan can connect Stripe and accept online invoice payments.
public bool AllowOnlinePayments { get; set; } = false;
/// When true, companies on this plan can access accounting features: Chart of Accounts, Bills, Expenses, and Accounting Export.
public bool AllowAccounting { get; set; } = false;
/// When true, companies on this plan can use AI Photo Quote analysis (subject to MaxAiPhotoQuotesPerMonth).
public bool AllowAiPhotoQuotes { get; set; } = false;
/// When true, companies on this plan can use the AI Inventory Assist lookup feature.
public bool AllowAiInventoryAssist { get; set; } = false;
/// When true, companies on this plan can run the AI Catalog Price Check (Enterprise only).
public bool AllowAiCatalogPriceCheck { get; set; } = false;
public bool IsActive { get; set; } = true;
public int SortOrder { get; set; }
}