Documentation
¶
Index ¶
- func GenerateTableStruct(db *gorm.DB, options ...Option)
- type FileNameHandler
- type ModelNameHandler
- type Option
- func GenTables(table ...string) Option
- func WithFieldCoverable(yes bool) Option
- func WithFieldNullable(yes bool) Option
- func WithMapGoTypes(mapTypes map[string]string) Option
- func WithOutFileNameHandler(handler FileNameHandler) Option
- func WithOutFileSuffixName(path string) Option
- func WithOutModelNameHandler(handler ModelNameHandler) Option
- func WithOutPath(path string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTableStruct ¶
Types ¶
type FileNameHandler ¶
type ModelNameHandler ¶
type Option ¶
type Option func(config *option)
func WithFieldCoverable ¶
generate pointer when field has default value
func WithFieldNullable ¶
func WithMapGoTypes ¶
【default】
"bool": { "bool" }, "tinyint": { "int8" }, "smallint": { "int16" }, "mediumint": { "int32" }, "bigint": { "int64" }, "int": { "int" },
func WithOutFileNameHandler ¶
func WithOutFileNameHandler(handler FileNameHandler) Option
func WithOutModelNameHandler ¶
func WithOutModelNameHandler(handler ModelNameHandler) Option
Click to show internal directories.
Click to hide internal directories.