Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateOne ¶
GenerateOne generate gorm code from sql, which can be obtained from parameters, files and db, with priority from highest to lowest
Types ¶
type Args ¶
type Args struct {
SQL string // DDL sql
DDLFile string // DDL file
DBDsn string // connecting to mysql's dsn
DBTable string
Package string // specify the package name (only valid for model types)
GormType bool // whether to display the gorm type name (only valid for model type codes)
JSONTag bool // does it include a json tag
JSONNamedType int // json field naming type, 0: snake case such as my_field_name, 1: camel sase, such as myFieldName
IsEmbed bool // is gorm.Model embedded
CodeType string // specify the different types of code to be generated, namely model (default), json, dao, handler, proto
ForceTableName bool
Charset string
Collation string
TablePrefix string
ColumnPrefix string
NoNullType bool
NullStyle string
}
Args generate code arguments
Click to show internal directories.
Click to hide internal directories.