- modules 模块
- article 以文章模块为例
- dto (Data Transfer Object: 数据传输对象)
- create-article.dto.ts
- update-article.dto.ts
- entities (实体类)
- article.entity.ts
- article.controller.ts (控制器,负责处理路由、中转、验证等一些简洁的业务)
- article.service.ts (提供者/服务,负责处理具体的业务,如数据库的增删改查)
- article.module.ts (模块,负责将 Controller 和 Service 连接起来)
- dto (Data Transfer Object: 数据传输对象)
- article 以文章模块为例
- app.controller.ts (基本控制器)
- app.module.ts (应用程序的根模块)
- app.service.ts (带有单个方法的基本服务)
- main.ts (应用程序入口文件)