@withpotter/plan — module reference

A support module — it mounts no HTTP routes of its own but contributes the internal building blocks below. See the package internal architecture for how the layers fit together.

Internals

Entities

Sequelize models owned by this module.

MerchantPlan — table merchant_plans

FieldType
idstring
tenantIdstring
tenantTenant
namestring
descriptionstring | null
amountnumber
currencystring
intervalPlanInterval
intervalCountnumber
paystackPlanCodestring | null
paystackPlanIdnumber | null
statusMerchantPlanStatus
featuresPlanFeature[]
trialDaysnumber | null
subscriberCountnumber
pricingKindPlanPricingKind
includesPlanIncludes | null
subscriptionDiscountPercentnumber | null
badgesstring[] | null
groupIdstring | null
groupLabelstring | null
groupRolePlanGroupRole | null
createdAtDate
updatedAtDate

Repositories

Data-access classes wrapping the entities.

MerchantPlanRepository

create · findById · findByPaystackPlanCode · listByTenant · getActivePlans · update · incrementSubscriberCount · decrementSubscriberCount · archive

Generated from the module’s source. Routes are relative to the engine root (default http://localhost:3001). For full request/response schemas use the live OpenAPI document.