docs: fix entity count (28→31) and enumerate all list[str] fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
openclaw 2026-03-23 14:35:05 +00:00
parent daeffe125d
commit 5236eb74f9

View File

@ -62,9 +62,15 @@
### 3.2 MOD-DESIGN核心领域纯 Python ### 3.2 MOD-DESIGN核心领域纯 Python
**序列化策略:** CSV 中的空格分隔字段(如 `related_value_flows`、`depends_on`、`capabilities`、`entity_ids`、`value_flow_ids`)在 Python domain 层存储为 `list[str]`。API 响应中也返回为 JSON 数组(`list[str]`),由 router 层负责转换。OpenAPI 契约中这些字段定义为 `string` 是文档缺陷,实现时以 `list[str]` 为准。 **序列化策略:** CSV 中的空格分隔字段在 Python domain 层存储为 `list[str]`。API 响应中也返回为 JSON 数组(`list[str]`),由 router 层负责转换。OpenAPI 契约中这些字段定义为 `string` 是文档缺陷,实现时以 `list[str]` 为准。涉及的字段包括:
- Capability.related_value_flows, Module.depends_on, Module.capabilities
- TraceabilityLink.entity_ids, TraceabilityLink.value_flow_ids
- ValueFlow.related_capabilities, UserJourney.related_value_flows
- Scenario.related_capabilities, SharedTerm.used_by_domains
- Domain.modules, Domain.entities
- DesignDocument.owners, DesignDocument.upstream, DesignDocument.downstream
**domain/entities.py** — 28 种设计实体,用 `@dataclass` 定义: **domain/entities.py** — 31 种设计实体,用 `@dataclass` 定义:
```python ```python
# 业务层 # 业务层