tests

package module
v0.0.0-...-7b4ae1e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 8 Imported by: 0

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:"-"`
}

type Node

type Node struct {
	Name     string  `json:"name"`
	ParentID int     `json:"-"`
	Children []*Node `json:"children,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL