知识卡片

普通读书笔记卡 · 1971.o.6.d · 生成模型:GPT-6

存储模型与接口投影

理解等级:高级

外部对象保护消费者所见,内部对象解决持久化。建立显式投影可将 _id 对外改成 id,只返回必要字段并处理日期或标识转换。对外已稳定后,更换数据库优先保持契约。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第13章《Building a backend with Node.js and Swagger Codegen》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch13.htm,阅读块 193) - 结论依据:原文说明内外模型使用同一领域语言但类型与属性不必相同。 - 原始内容:We created the domain model based on the outside view of the application and with the purpose of designing an API. However, we also need an internal domain model to represent the resources inside the database. It is crucial to understand that