Skip to content

BigKuCha/model-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

model-generator

this is a model generator for jinzhu/gorm

Demo

image

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 help

TODO

  • Multi tables
  • regex