Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GormInitWithSqlite ¶
func GormInitWithSqlite(tmpDBPath string)
GormInitWithSqlite 初始化Gorm测试库,并执行migrate.
func RunMigrations ¶
func RunMigrations(allModels ...interface{})
RunMigrations 执行对应Models的Migrations的操作。
Types ¶
type CustomTree ¶
type CustomTree struct { mptt.ModelBase Name string `gorm:"type:varchar(125);index:custom_tree_name" validate:"required"` Children []*CustomTree `gorm:"-"` }
Click to show internal directories.
Click to hide internal directories.