mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
commit
ae4b2ed7aa
10
g.go
10
g.go
@ -18,18 +18,18 @@ import "os"
|
|||||||
|
|
||||||
var cmdGenerate = &Command{
|
var cmdGenerate = &Command{
|
||||||
UsageLine: "generate [Command]",
|
UsageLine: "generate [Command]",
|
||||||
Short: "generate code based on application",
|
Short: "source code generator",
|
||||||
Long: `
|
Long: `
|
||||||
bee generate scaffold [scaffoldname] [-fields=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"]
|
bee generate scaffold [scaffoldname] [-fields=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:3306)/test"]
|
||||||
The generate scaffold command will do a number of things for you.
|
The generate scaffold command will do a number of things for you.
|
||||||
-fields: a list of table fields.
|
-fields: a list of table fields. Format: field:type, ...
|
||||||
-driver: [mysql | postgresql | sqlite], the default is mysql
|
-driver: [mysql | postgresql | sqlite], the default is mysql
|
||||||
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
|
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
|
||||||
example: bee generate scaffold post -fields="title:string,body:text"
|
example: bee generate scaffold post -fields="title:string,body:text"
|
||||||
|
|
||||||
bee generate model [modelname] [-fields=""]
|
bee generate model [modelname] [-fields=""]
|
||||||
generate RESTFul model based on fields
|
generate RESTFul model based on fields
|
||||||
-fields: a list of table fields.
|
-fields: a list of table fields. Format: field:type, ...
|
||||||
|
|
||||||
bee generate controller [controllerfile]
|
bee generate controller [controllerfile]
|
||||||
generate RESTFul controllers
|
generate RESTFul controllers
|
||||||
@ -39,7 +39,7 @@ bee generate view [viewpath]
|
|||||||
|
|
||||||
bee generate migration [migrationfile] [-fields=""]
|
bee generate migration [migrationfile] [-fields=""]
|
||||||
generate migration file for making database schema update
|
generate migration file for making database schema update
|
||||||
-fields: a list of table fields.
|
-fields: a list of table fields. Format: field:type, ...
|
||||||
|
|
||||||
bee generate docs
|
bee generate docs
|
||||||
generate swagger doc file
|
generate swagger doc file
|
||||||
@ -52,7 +52,7 @@ bee generate appcode [-tables=""] [-driver=mysql] [-conn="root:@tcp(127.0.0.1:33
|
|||||||
-tables: a list of table names separated by ',', default is empty, indicating all tables
|
-tables: a list of table names separated by ',', default is empty, indicating all tables
|
||||||
-driver: [mysql | postgresql | sqlite], the default is mysql
|
-driver: [mysql | postgresql | sqlite], the default is mysql
|
||||||
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
|
-conn: the connection string used by the driver, the default is root:@tcp(127.0.0.1:3306)/test
|
||||||
-level: [1 | 2 | 3], 1 = models; 2 = models,controllers; 3 = models,controllers,router
|
-level: [1 | 2 | 3], 1 = models; 2 = models,controllers; 3 = models,controllers,router
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user