KamoCRM

Add PlatformAdmin controller + service for comp plan grants

FeatureBillingService
Ya
20 Aprili 2026, 19:43 UTC
Mwandishi
Kamo
Ahadi ya
620164f

- PlatformAdminController at /api/billing/platform (class-level @PlatformAdminOnly) - GET /orgs, GET /orgs/{orgId} - POST /orgs/{orgId}/grants, PATCH|DELETE /orgs/{orgId}/grants/{subId} - GET /plans (includes isPublic=false) - GET /events - PlatformAdminService: grant creates COMP SubscriptionRecord, cancels prior active sub, emits SubscriptionEvent **************** 5s idempotency - @PlatformAdminOnly + HandlerInterceptor: allow god-mode-active OR (TeamMember.isOrganizationOwner AND Organization.isTopLevel, re-read from DB) - SubscriptionRenewalScheduler: COMP branch cancels on expiry (COMP_EXPIRED) and never calls Stripe - BillingAdminService: MRR/ARR aggregation excludes paymentMethod=COMP - Long ids exposed as String (CockroachDB unique_rowid precision)

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila kitu kinaingia kwenye tovuti yako mwenyewe. Anza kwenye mpango wa bure na usome ukurasa huu tena katika mwezi mmoja.

Kuwa Huru MileleMtazamo wa bei