- Add `default_free_plan.py` to define the configuration for the Community Free Plan. - Refactor `quota_stub.py` as a unified entry point, delegating checks to `core/quota_manager`. - Implement core logic in `quota_manager.py` to support retrieving quotas from the premium module or configuration files. - Update `tenant_subscription_controller` to return Community Free Plan information.
31 lines
797 B
Python
31 lines
797 B
Python
"""
|
|
社区版默认免费套餐配置
|
|
当无法从 SaaS 版获取 premium 模块时,使用此配置作为兜底
|
|
"""
|
|
|
|
DEFAULT_FREE_PLAN = {
|
|
"name": "记忆体验版",
|
|
"category": "saas_personal",
|
|
"tier_level": 0,
|
|
"version": "1.0",
|
|
"status": True,
|
|
"price": 0,
|
|
"billing_cycle": "permanent_free",
|
|
"core_value": "感受永久记忆",
|
|
"tech_support": "社群交流",
|
|
"sla_compliance": "无",
|
|
"page_customization": "无",
|
|
"theme_color": "#64748B",
|
|
"quotas": {
|
|
"workspace_quota": 1,
|
|
"skill_quota": 5,
|
|
"app_quota": 2,
|
|
"knowledge_capacity_quota": 0.3,
|
|
"memory_engine_quota": 1,
|
|
"end_user_quota": 1,
|
|
"ontology_project_quota": 3,
|
|
"model_quota": 1,
|
|
"api_ops_rate_limit": 50,
|
|
},
|
|
}
|