Deliberately exposes NO tenant/workspace parameter: the active tenant (and optional
workspace selector) is resolved inside the adapter from the trusted request context
(AsyncLocalStorage), so no caller can supply an arbitrary/foreign id. This is the single
choke-point for the compound (tenant, workspace) isolation (global-tenancy §9.3 / FR-5,
D2) — handlers never scatter where organizationId/workspaceId by hand.
Post 仓储端口(领域层自持·依赖倒置)。
Remarks
Deliberately exposes NO tenant/workspace parameter: the active tenant (and optional workspace selector) is resolved inside the adapter from the trusted request context (AsyncLocalStorage), so no caller can supply an arbitrary/foreign id. This is the single choke-point for the compound
(tenant, workspace)isolation (global-tenancy §9.3 / FR-5, D2) — handlers never scatterwhere organizationId/workspaceIdby hand.分层对齐后端口流动充血领域实体
Post(非裸记录·见 architecture「Entity Doctrine」):create收业务态Post.draft(...)(适配器补租户/id/时间戳落库)、find/list返回复原后的完整 领域实体;到传输投影PostReadModel的映射归 application,领域实体不越界进api/。