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:
@@ -12,6 +12,9 @@ const errorMessageMap: Record<string, string> = {
|
||||
tenant_scope_missing: "租户上下文缺失",
|
||||
query_failed: "数据读取失败",
|
||||
quota_insufficient: "生成额度不足",
|
||||
trial_plan_expired: "免费试用已到期,请联系管理员开通",
|
||||
subscription_required: "当前租户尚未开通有效套餐,请联系管理员",
|
||||
subscription_inactive: "当前租户套餐已失效,请联系管理员",
|
||||
llm_unavailable: "生成服务不可用",
|
||||
analyze_context_required: "请先填写品牌或模板上下文信息",
|
||||
title_context_required: "请先确认品牌、关键词或竞品信息",
|
||||
|
||||
Reference in New Issue
Block a user