Commit Graph

3 Commits

Author SHA1 Message Date
t0ng7u
96caec1626 feat: Add subscription upgrade group with auto downgrade 2026-02-01 02:17:17 +08:00
t0ng7u
6300c31d70 🚀 refactor: Simplify subscription quota to total amount model
Remove per-model subscription items and switch to a single total quota per plan and user subscription. Update billing, reset, and logging flows to operate on total quota, and refactor admin/user UI to configure and display total quota consistently.
2026-02-01 00:35:08 +08:00
t0ng7u
ffebb35499 feat(subscription): harden subscription billing with resets, idempotency, and production-grade stability
Add plan-level quota reset periods and display/reset cadence in admin/UI
Enforce natural reset alignment with background reset task and cleanup job
Make subscription pre-consume/refund idempotent with request-scoped records and retries
Use database time for consistent resets across multi-instance deployments
Harden payment callbacks with locking and idempotent order completion
Record subscription purchases in topup history and billing logs
Optimize subscription queries and add critical composite indexes
2026-01-31 00:31:47 +08:00