File tree Expand file tree Collapse file tree 1 file changed +26
-5
lines changed Expand file tree Collapse file tree 1 file changed +26
-5
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- ** -dir**
6
6
7
- 生成的api文件存放路径(默认为` ./desc/ ` )
7
+ 生成的api文件存放路径(默认为` ./desc ` )
8
8
- ** -home**
9
9
10
10
生成代码使用的模板路径(默认使用内置模板)
@@ -17,10 +17,31 @@ api文件路由前缀(默认为`/prefix`)
17
17
- ** -url***
18
18
19
19
数据库连接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
+
21
43
22
- api服务名,不填默认为数据库名的小驼峰
23
44
### 注意事项
24
45
25
- - 为了代码安全,生成的api文件不会覆盖同名文件
26
- - 生成的api文件中的注释来源有数据库的comment ,所以我们推荐任何字段和表都要加comment
46
+ - 为了代码安全,生成的api和proto文件不会覆盖同名文件
47
+ - 生成的api和proto文件中的注释来源有数据库的comment ,所以我们推荐任何字段和表都要加comment
You can’t perform that action at this time.
0 commit comments