mirror of
https://github.com/beego/bee.git
synced 2024-11-22 15:10:54 +00:00
help message format
This commit is contained in:
parent
e42dc06fd8
commit
6d56c04147
8
g.go
8
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
|
||||||
|
Loading…
Reference in New Issue
Block a user