File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,15 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
6666 - admin 系统后台
6767 - api/ 接口
6868 - crud/ CRUD
69- - model/ 模型
69+ - model 模型
70+ - \_\_ init__ .py 必须在此文件内导入所有模型类
71+ - …
7072 - schema/ 数据传输
7173 - service/ 服务
7274 - tests/ 单元测试
7375 - generator/ 代码生成
7476 - task/ 任务
75- - ...
77+ - …
7678 - common/ 公共资源
7779 - core/ 核心配置
7880 - database/ 数据库连接
@@ -85,7 +87,7 @@ mvc 架构作为常规设计模式,在 python web 中很常见,但是三层
8587 - templates/ 模版文件
8688 - utils/ 工具包
8789- deploy/ 服务器部署
88- - ...
90+ - …
8991
9092:::
9193
Original file line number Diff line number Diff line change @@ -35,7 +35,9 @@ title: 插件开发
3535 - xxx 插件名
3636 - api/ 接口,务必查看下方【插件接口附加说明】
3737 - crud/ CRUD
38- - model/ 模型
38+ - model 模型
39+ - \_\_ init__ .py 必须在此文件内导入所有模型类
40+ - …
3941 - schema/ 数据传输
4042 - service/ 服务
4143 - \_\_ init__ .py 作为 python 包保留(必填项)
@@ -50,7 +52,8 @@ title: 插件开发
5052
5153- 如果插件作为独立 app 发布(在 ` backend/app ` 目录下的应用,视为独立
5254 app),则插件路由应完全遵循 [ 路由结构] ( ../guide/reference/router.md#路由结构 ) 进行定义
53- - 如果插件作为现有 app 扩展功能发布,则插件路由应当根据现有 app 中的路由结构进行 1:1 结构复制,插件路由将按结构自动注入,可参考 fba
55+ - 如果插件作为现有 app 扩展功能发布,则插件路由应当根据现有 app 中的路由结构进行 1:1 结构复制,插件路由将按结构自动注入,可参考
56+ fba
5457 源码中的内置插件 [ notice] ( https://github.com/fastapi-practices/fastapi_best_architecture/tree/master/backend/plugin/notice/api )
5558
5659:::
You can’t perform that action at this time.
0 commit comments