Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAllModel ¶
func GenerateAllModel(cfg *ModelConfig) ([]string, []error)
GenerateAllModel generates the struct for all table
func GenerateSingleModel ¶
func GenerateSingleModel(cfg *ModelConfig, tbName string) (string, error)
GenerateSingleModel generates the structure content of a single Model
Types ¶
type Field ¶
type Field struct { Field string `gorm:"column:Field"` Type string `gorm:"column:Type"` Collation string `gorm:"column:Collation"` Null string `gorm:"column:Null"` Key string `gorm:"column:Key"` Default sql.NullString `gorm:"column:Default"` Extra string `gorm:"column:Extra"` Privileges string `gorm:"column:Privileges"` Comment string `gorm:"column:Comment"` }
Field field
type ModelConfig ¶ added in v1.1.3
Click to show internal directories.
Click to hide internal directories.