Skip to content

Commit 4f0b1b2

Browse files
author
lxr
committed
更新readme
1 parent 1766466 commit 4f0b1b2

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- **-dir**
66

7-
生成的api文件存放路径(默认为`./desc/`
7+
生成的api文件存放路径(默认为`./desc`
88
- **-home**
99

1010
生成代码使用的模板路径(默认使用内置模板)
@@ -17,10 +17,31 @@ api文件路由前缀(默认为`/prefix`)
1717
- **-url***
1818

1919
数据库连接url,形如`root:password@tcp(127.0.0.1:3306)/database`
20-
- **-service***
20+
- **-service**
21+
22+
api服务名(默认为数据库名的小驼峰)
23+
24+
### 根据数据库表生成proto文件
25+
26+
27+
- **-dir**
28+
29+
生成的api文件存放路径(默认为`./pb`
30+
- **-home**
31+
32+
生成代码使用的模板路径(默认使用内置模板)
33+
- **-package**
34+
35+
proto文件所在的包名(默认为数据库名的小驼峰)
36+
- **-table***
37+
38+
要生成的数据表名
39+
- **-url***
40+
41+
数据库连接url,形如`root:password@tcp(127.0.0.1:3306)/database`
42+
2143

22-
api服务名,不填默认为数据库名的小驼峰
2344
### 注意事项
2445

25-
- 为了代码安全,生成的api文件不会覆盖同名文件
26-
- 生成的api文件中的注释来源有数据库的comment,所以我们推荐任何字段和表都要加comment
46+
- 为了代码安全,生成的api和proto文件不会覆盖同名文件
47+
- 生成的api和proto文件中的注释来源有数据库的comment,所以我们推荐任何字段和表都要加comment

0 commit comments

Comments
 (0)