kra-oa/internal/modules/README.md

17 lines
797 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Internal Modules
业务代码按模块组织在 `internal/modules/<name>` 下。每个模块可以拥有自己的
`biz`、`data`、`service` 和 `transport`,模块之间通过接口和集成层协作。
## 当前模块
`system` 是模板自带的后台管理模块包含用户、权限、菜单、API、公告、部门、
字典、文件、审计、定时任务、支付和系统初始化等现有表与逻辑。
## 新增业务模块
新增业务请创建 `internal/modules/<business>`,不要把领域模型、仓储或 HTTP
处理器继续添加到 `internal/biz`、`internal/data`、`internal/service` 等根目录。
数据库表和迁移由业务模块自己的 `data` 包负责;只有数据库连接生命周期和通用
迁移执行器属于 `internal/platform/database`