Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bigkucha/model-generator
jinzhu/gorm model生成器
https://github.com/bigkucha/model-generator
generator gorm gorm-orm model model-generator
Last synced: 3 months ago
JSON representation
jinzhu/gorm model生成器
- Host: GitHub
- URL: https://github.com/bigkucha/model-generator
- Owner: BigKuCha
- Created: 2017-06-21T01:58:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T02:45:15.000Z (about 5 years ago)
- Last Synced: 2024-06-20T06:39:38.374Z (7 months ago)
- Topics: generator, gorm, gorm-orm, model, model-generator
- Language: Go
- Homepage:
- Size: 2.64 MB
- Stars: 42
- Watchers: 4
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
model-generator
===this is a model generator for [jinzhu/gorm](https://github.com/jinzhu/gorm)
Demo
===
![image](https://github.com/bigkucha/model-generator/blob/master/media/test.gif)Install
===```
$ go get github.com/bigkucha/model-generator
```Usage
===```
$ $GOPATH/bin/model-generator -u=root -p=(pwd of your mysql) -d=database -t=table -dir=
```Flags
===
Flag
Rule
Usage
username, u
optional, default 'root'
username of mysql
password, p
require, default null
password of mysql
database, d
require
select your database
table, t
optional,default 'ALL'
chose table to generate model, if not set ,all tables in your database will be used
dir
optional,default 'model' of current directory
models where to be store
Note
===
run `$GOPATH/bin/model-generator -h` for more helpTODO
===
- Multi tables
- regex