feat(membership): enforce tenant subscription plans with blocked UI
Add configurable membership plans (free/plus/pro) synced to DB on boot, a subscription guard middleware that blocks tenant endpoints on expired or missing plans, and a MembershipBlockedView that surfaces the reason so the admin can contact the tenant owner. Quota and brand-library reads now honor the active plan's policy JSON and expired subscriptions.
This commit is contained in:
@@ -30,9 +30,25 @@ export interface UserInfo {
|
||||
tenant_id: number;
|
||||
tenant_role: string;
|
||||
permissions: string[];
|
||||
membership: MembershipInfo | null;
|
||||
kol_profile: KolProfileBrief | null;
|
||||
}
|
||||
|
||||
export interface MembershipInfo {
|
||||
plan_code: string;
|
||||
plan_name: string;
|
||||
status: string;
|
||||
blocked: boolean;
|
||||
blocked_reason: string | null;
|
||||
start_at: string | null;
|
||||
end_at: string | null;
|
||||
article_generation_limit: number;
|
||||
article_quota_cycle: string;
|
||||
company_limit: number;
|
||||
image_storage_bytes: number;
|
||||
contact_admin_on_expiry: boolean;
|
||||
}
|
||||
|
||||
export interface LoginResponse {
|
||||
access_token: string;
|
||||
refresh_token: string;
|
||||
|
||||
Reference in New Issue
Block a user