Goujana subscriptions
Identity + billing lifecycle of ONE active Goujana add-on plan for
ONE account — decoupled from what that plan actually grants (see
GoujanaPayrollLimits below). One row per (account, product_line): an
account can hold a payroll plan AND a future industry plan at the same
time, each its own row here.
Owner's explicit call (2026-08-14): Goujana add-on plans (nómina, future
industries) are a SEPARATE product line from the general ERP plans
(goujana_gateway.plans) — "no compiten entre ellos" — and their capacity
data must live entirely inside goujana_gateway (this app, this tenant's
own database), never as new fields on the shared core
database_router_s.UserDb/SubscriptionType tables that every Sofisis
tenant migrates. This is also why this model is NOT layered onto
GoujanaLeadFollowUp above: that model's cardinality (one row per lead,
`unique=True`) and lifecycle (funnel stage that goes stale once `won`)
don't fit a subscription that must support multiple concurrent product
lines per account and keeps mutating for years after the sale — same
no-FK `user_db_id` convention as that model, not the same table.
See README_ESTRUCTURA_SUSCRIPCIONES_GOUJANA.md for the full rationale
and the migration this replaced (GoujanaPayrollSubscription, one single
table mixing lifecycle + payroll-specific fields — replaced with zero
real rows in any environment, so no data migration was needed).
| Field | Description |
|---|---|
| Account | database_router_s.User.pk (UserDb) this subscription belongs to. |
| Product line | GoujanaProductLine value — which *_plans.py catalog this plan comes from. |
| Plan | Key into that product line's plan registry (e.g. payroll_plans.GOUJANA_PAYROLL_PLANS_REGISTRY). |
| Active | |
| Expires at |
Goujana subscriptions It has the following related modules and may be of interest to you: