[高级] 多租户支持 #28

Closed
opened 2026-05-05 01:01:45 +08:00 by admin · 0 comments
Owner

背景

当前系统仅支持单组织使用,SaaS 化需要多租户隔离。

需求

  1. 租户模型:Tenant 表,用户归属租户
  2. 数据隔离:Agent/Workflow/Execution 按 tenant_id 过滤
  3. 资源配额:每租户 Agent 数、执行并发数、存储空间
  4. 租户管理后台:创建/禁用/配额调整

涉及模块

  • backend/app/models/ — 新增 Tenant 模型
  • backend/app/api/auth.py — 注册时绑定租户
  • backend/app/core/database.py — 查询自动注入 tenant_id

优先级

低 — 当前单租户够用,SaaS 化时再做

## 背景 当前系统仅支持单组织使用,SaaS 化需要多租户隔离。 ## 需求 1. 租户模型:Tenant 表,用户归属租户 2. 数据隔离:Agent/Workflow/Execution 按 tenant_id 过滤 3. 资源配额:每租户 Agent 数、执行并发数、存储空间 4. 租户管理后台:创建/禁用/配额调整 ## 涉及模块 - backend/app/models/ — 新增 Tenant 模型 - backend/app/api/auth.py — 注册时绑定租户 - backend/app/core/database.py — 查询自动注入 tenant_id ## 优先级 低 — 当前单租户够用,SaaS 化时再做
admin self-assigned this 2026-05-05 01:01:45 +08:00
admin closed this issue 2026-05-10 14:42:31 +08:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/aiagent#28