Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTableStruct ¶
Types ¶
type Config ¶
type Config struct {
//文件生成路径
ModelPkgPath string
//类型映射 column type <=> go type
MapTypes map[string]string
//指定需要生成的表,空则生成所有
GenTables []string
// generate model global configuration
FieldNullable bool // generate pointer when field is nullable
FieldCoverable bool // generate pointer when field has default value, to fix problem zero value cannot be assign: https://gorm.io/docs/create.html#Default-Values
FieldSignable bool // detect integer field's unsigned type, adjust generated data type
FieldWithIndexTag bool // generate with gorm index tag
FieldWithTypeTag bool // generate with gorm column type tag
}
Click to show internal directories.
Click to hide internal directories.