initdata

package
v0.0.0-...-d62a2a9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitData

func InitData(db *gorm.DB)

InitData @description: 对数据库表和表数据进行初始化 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 23:45 @success:

Types

type InitConfig

type InitConfig struct {
}

func (InitConfig) DataInserted

func (i InitConfig) DataInserted(db *gorm.DB) bool

DataInserted @description: 数据是否已插入 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 18:19 @success:

func (InitConfig) InitializeData

func (i InitConfig) InitializeData(db *gorm.DB) (err error)

InitializeData @description: 初始化数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 17:26 @success:

func (InitConfig) Update

func (i InitConfig) Update(db *gorm.DB) error

Update @description: 更新数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2023/2/10 16:50 @success:

type InitRole

type InitRole struct {
}

func (InitRole) DataInserted

func (i InitRole) DataInserted(db *gorm.DB) bool

DataInserted @description: 数据是否已插入 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 18:19 @success:

func (InitRole) InitializeData

func (i InitRole) InitializeData(db *gorm.DB) (err error)

InitializeData @description: 初始化数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 17:26 @success:

type InitTable

type InitTable interface {
	DataInserted(*gorm.DB) bool          //表数据是否已经插入
	InitializeData(*gorm.DB) (err error) //初始化表数据
}

type InitUser

type InitUser struct {
}

func (InitUser) DataInserted

func (i InitUser) DataInserted(db *gorm.DB) bool

DataInserted @description: 数据是否已插入 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 18:19 @success:

func (InitUser) InitializeData

func (i InitUser) InitializeData(db *gorm.DB) (err error)

InitializeData @description: 初始化数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 17:26 @success:

Jump to

Keyboard shortcuts

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