database

package
v0.0.0-...-150877d Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataBase

func NewDataBase(c *conf.Database) (*gorm.DB, error)

NewDataBase 初始化数据库

Types

type DeleteModel

type DeleteModel struct {
	IsDelete bool `json:"del" gorm:"column:del"` // 数据软删除
}

type Model

type Model struct {
	ID    uint32    `json:"id" gorm:"column:id; primaryKey"`
	Ctime time.Time `json:"ctime" gorm:"column:ctime"` // 状态最后一次更改
	Mtime time.Time `json:"-" gorm:"column:mtime"`     // 数据最后一次修改
}

Jump to

Keyboard shortcuts

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