feat: 战略地图多租户隔离 — 酣客/博海地图按企业显示
- strategic_maps/map_objectives 加 entity_id 列+模型+回填(按标题: 酣客→1/博海→2) - maps: list按企业过滤, create/create-with-template强制token企业, update/delete/batch-delete/connections/review 跨企业404 - objectives/versions: 按map归属过滤 - _sync_map_objectives 继承地图entity - 实证: 酣客token→map32(酣客), 博海token→map49(博海), 跨企业读404 - pytest 482 passed - 多租户隔离专项最终收官(含周报遗留项)
This commit is contained in:
@@ -48,6 +48,7 @@ class StrategicMap(Base):
|
||||
"""战略地图"""
|
||||
__tablename__ = "strategic_maps"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
entity_id = Column(Integer, default=1, comment="企业ID (多租户隔离 2026-08-25)")
|
||||
title = Column(String(200), nullable=False, comment="地图名称")
|
||||
version = Column(String(20), default="v1.0", comment="版本号")
|
||||
status = Column(String(20), default="draft", comment="draft/published")
|
||||
@@ -271,6 +272,7 @@ class MapObjective(Base):
|
||||
"""战略地图目标: 每个维度下的具体目标"""
|
||||
__tablename__ = "map_objectives"
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
entity_id = Column(Integer, default=1, comment="企业ID (多租户隔离 2026-08-25)")
|
||||
map_id = Column(Integer, ForeignKey("strategic_maps.id", ondelete="CASCADE"), nullable=False, comment="关联地图")
|
||||
dimension_key = Column(String(50), nullable=False, comment="所属维度: finance/customer/process/learning")
|
||||
name = Column(String(200), nullable=False, comment="目标名称")
|
||||
|
||||
Reference in New Issue
Block a user