add mysql and DAO
This commit is contained in:
@@ -52,6 +52,43 @@ yarn test
|
||||
└─controller
|
||||
|
||||
```
|
||||
### git提交规范规范
|
||||
```
|
||||
git commit 规范
|
||||
采用 Conventional Commits规范,请细看 Conventional Commits。
|
||||
|
||||
<type>[optional scope]: <description>
|
||||
type 值如下:
|
||||
feat:新功能(feature)
|
||||
fix:修补 bug
|
||||
docs:文档相关(documentation)
|
||||
style: 格式(不影响代码运行的变动,空格,注释等)
|
||||
refactor:重构(即不是新增功能,也不是修改 bug 的代码变动,代码优化)
|
||||
perf: 提升产品用户体验的改动
|
||||
test:添加缺失测试、更正或者删除现有测试,test 相关代码改动都用这个
|
||||
chore:非 src 或者 test代码变动,如辅助工具、配置文件等变动。
|
||||
build:影响构建系统或外部依赖项的更改(示例范围:gulp,broccoli, npm)
|
||||
ci:对 CI 配置文件和脚本的更改,一般我们都用不上,开源项目用得上(示例范围:Travis,Circle,BrowserStac k,SauceLabs)
|
||||
revert:回滚提交的版本
|
||||
```
|
||||
详细文档查看:[git 仓库管理规范] [git-rules]
|
||||
|
||||
### 开发基本规范
|
||||
- 能不用any,绝对不使用any
|
||||
|
||||
- interface维护在interface目录下
|
||||
|
||||
- 代码注释
|
||||
- 每个方法,类必须有注释
|
||||
- 方法、类型注释必须描述清楚方法名称,参数,返回值等
|
||||
- 关键逻辑行,必须注释
|
||||
- 注释从读者的角度
|
||||
|
||||
- 命名
|
||||
- 文件名使用小驼峰, 如:baseService
|
||||
- 类名使用大驼峰,如:BaseService
|
||||
- 接口名使用大驼峰并以I开头,如:ILog
|
||||
- 方法名字尽量以动词开头,如:getSomething,getUserInfo
|
||||
|
||||
[midway]: https://midwayjs.org
|
||||
[git-rules]: https://confluence.sui.work/pages/viewpage.action?pageId=51120607
|
||||
|
||||
Reference in New Issue
Block a user