Hub 2.0 step 6: AI cap and markup per church

The cap and markup move from the licence to the customer (migrated), use
is counted over all the church's installs under one lock per church, and
the licence token carries the church's cap. Settings → AI shows product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 08:55:43 +02:00
co-authored by Claude Opus 5.5
parent 6e51780103
commit 59e6b9f03c
11 changed files with 138 additions and 72 deletions
+6 -1
View File
@@ -61,6 +61,10 @@ Hub 2.0.0, Cross Code Hub, in steps (`docs/HUB-2.0-PLAN.md`).
as a custom price). Charged once per invoice and never discounted (12 months' price when yearly).
For a domain included: its renewal date, an email to the alert address 30 days before (once per
renewal), and **Renewed** on the customer page to move it on a year.
- **AI per church** (step 6): the monthly AI cap and markup are the church's (customer page →
Details), shared by all its sites: a call from any of them counts what all of them used this month,
under one lock so two calls at once can't both take the last of it. The licence token carries the
church's cap. Settings → AI shows each site's use with its product and the church's cap.
### Changed
@@ -70,7 +74,8 @@ Hub 2.0.0, Cross Code Hub, in steps (`docs/HUB-2.0-PLAN.md`).
otherwise); the other products register with protocol v2 (step 2).
- Migrations `20261104132032_products`, `20261104150000_releases_per_product`,
`20261104170000_billing_per_customer` (moves each billed licence's schedule to its customer,
so billing carries on unchanged), `20261104190000_customer_address`.
so billing carries on unchanged), `20261104190000_customer_address`,
`20261105080000_ai_per_customer` (each church takes its licence's AI cap and markup).
## [1.7.0] - 2026-11-03