new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Better Auth · Plugins · all subjects

chargebee/schema

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Chargebee database schema tables

The Chargebee plugin adds these tables: (1) user table: chargebeeCustomerId (string, optional). (2) organization table (when organization.enabled is true): chargebeeCustomerId (string, optional). (3) subscription table: id (string, primary key), referenceId (string, not unique), chargebeeCustomerId (string, optional), chargebeeSubscriptionId (string, optional), status (string, default 'future', values: future, in_trial, active, non_renewing, paused, cancelled, transferred), periodStart (Date, optional), periodEnd (Date, optional), trialStart (Date, optional), trialEnd (Date, optional), canceledAt (Date, optional), seats (number, optional), metadata (string JSON, optional). (4) subscriptionItem table: id (string, primary key), subscriptionId (string), itemPriceId (string), itemType (string: plan, addon, charge), quantity (number), unitPrice (number, optional), amount (number, optional).

Chargebee subscription reference ID requirements

The referenceId field in subscription table should NOT be a unique field in database, as it must allow users to resubscribe after cancellation. This enables users to cancel subscription and later create new subscription with same reference ID.

Chargebee schema customization

To customize schema table names or fields, pass schema option to plugin: chargebee({ schema: { subscription: { modelName: 'chargebeeSubscriptions', fields: { referenceId: 'userId' } } } }). This allows mapping subscription table to different name and mapping fields to different column names.

Give your agent this brain