Subscription plans – system description

Fields of the plan table, cycle protection of inheritance, saving and deletion rules, and the list's data sources and permission keys.

Overview

A plan is master data; its content (functions, limits, prices) comes from the per-plan items of the subscription definition. Table names carry the installation's own prefix in the database.

Data model

TableMain fields
subscription_plancode, name, description, parent_plan_id (inheritance, cycle-protected), is_addon, is_free, level, price_month, currency, sort_order, status
subscription_plan_to_storestores
subscription_plan_featurelegacy content table; planFeatures() and syncGrants() still read it

List, save, delete

  • List: filter add-on, status, search; sort by code, name, monthly fee; columns include the number of functions (legacy content table) and of subscriptions; icons edit, delete, parent, subscriptions.
  • Save: code [A-Za-z0-9_]{2,32} (error_code), name required (error_name); the parent cannot be the plan itself or a descendant (normalizeParent); the form links to the definition screen (with list) and shows the Dlbtpayment::ANNUAL_DISCOUNT (10%); after saving dlbtentitlement->flush().
  • Delete: blocked by a subscription (error_in_use) or a child plan (error_has_children); otherwise physical deletion with the legacy content rows; no canBulk for bulk delete.

Permissions

  • list: UNMAPPED; edit, add, delete, debug: not classified (projected from the old catalogue). For a new record canSave asks for edit, because there is no add row in the master.
  • No content scope (system master).
Related topics: plan permissions