知识卡片
操作事件可按业务复合键识别
货物处理事件和承运段都对应不可互换的具体发生,因此在原书模型中是实体。承运段可由运输时刻表代码识别;与领域专家讨论后,处理事件可用货物 ID、完成时间和事件类型的组合识别。这个复合键依赖案例中“同一货物同一时刻不能既装载又卸载”等业务约束;若实际业务允许同组合重复,就不能照搬。参见[[承运段与操作事件记录运输过程]]。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 原书第07章|Distinguishing Entities and Value Objects · 查看原书依据
Each Carrier Movement will be identified by a code obtained from a shipping schedule. Another discussion with a domain expert reveals that Handling Events can be uniquely identified by the combination of Cargo ID, completion time, and type.
参考来源
- 位置:《Domain-Driven Design: Tackling Complexity in the Heart of Software》第51章《原书第07章|Distinguishing Entities and Value Objects》(源文件:_epub-src/0321125215_ch07lev1sec3.html)
- 结论依据:原文定义这两类不可互换的事件为实体,列出承运段时刻表代码和处理事件三字段组合的标识,并给出同刻不能装卸的案例规则。
- 原始内容:Each Carrier Movement will be identified by a code obtained from a shipping schedule. Another discussion with a domain expert reveals that Handling Events can be uniquely identified by the combination of Cargo ID, completion time, and type.