Documentation ¶
Index ¶
Constants ¶
View Source
const (
ModelPkg = "model"
)
View Source
const (
Version = "1.3.0"
)
Variables ¶
This section is empty.
Functions ¶
func RenderWithMap ¶
func RenderWithStruct ¶
Types ¶
type BaseStruct ¶
type Column ¶
type Column struct { TableName string `gorm:"column:TABLE_NAME"` ColumnName string `gorm:"column:COLUMN_NAME"` ColumnComment string `gorm:"column:COLUMN_COMMENT"` DataType string `gorm:"column:DATA_TYPE"` ColumnKey string `gorm:"column:COLUMN_KEY"` ColumnType string `gorm:"column:COLUMN_TYPE"` ColumnDefault string `gorm:"column:COLUMN_DEFAULT"` Extra string `gorm:"column:EXTRA"` IsNullable string `gorm:"column:IS_NULLABLE"` }
Column table column's info
func (*Column) AutoIncrement ¶
func (*Column) IsPrimaryKey ¶
type DaoBaseStruct ¶
type DaoBaseStruct struct {
DaoPackageName string
}
type GormDaoGenerator ¶
type GormDaoGenerator struct { DB *gorm.DB PackageName string ModelPackageName string ModelPath string DaoPackageName string DaoPath string Database string TmplPath string }
func NewGormGenerator ¶
func NewGormGenerator(connStr, database, prefix, packageName, tmplPath, modelPackage, modelPath, daoPackage, daoPath string) *GormDaoGenerator
func (*GormDaoGenerator) Gen ¶
func (g *GormDaoGenerator) Gen()
func (*GormDaoGenerator) GenDaoStruct ¶
func (g *GormDaoGenerator) GenDaoStruct(tableName string) DaoStruct
func (*GormDaoGenerator) GenTableStruct ¶
func (g *GormDaoGenerator) GenTableStruct(tableName string) BaseStruct
func (*GormDaoGenerator) Tables ¶
func (g *GormDaoGenerator) Tables() (dbTables []string)
Tables 获取所有数据表 不包含分表
Click to show internal directories.
Click to hide internal directories.