feat(admin): show user subscription plan and token quota in user pages

Expose active subscription summary on user list and detail so operators can see plan type, total/used/remaining tokens without opening billing subscriptions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-09-07 16:22:08 +08:00
parent c1aa1ba459
commit e07686f29d
6 changed files with 193 additions and 10 deletions
+9
View File
@@ -44,8 +44,17 @@ export type AuthStatus = {
unrestricted?: boolean;
};
export type UserSubscriptionSummary = {
planType: string;
status: 'active' | 'expired' | 'cancelled';
periodTokensLimit: number;
periodTokensUsed: number;
expiresAt: number;
};
export type AdminUserRow = PortalUser & {
billingFormula?: 'A' | 'B';
subscription?: UserSubscriptionSummary | null;
createdAt: number;
updatedAt: number;
};