db

package
v0.0.0-...-7a0ce36 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Invalid = 1 + iota
	Valid
	Expired
	Canceled
)

Variables

This section is empty.

Functions

func DB

func DB() *gorm.DB

Types

type BasicModel

type BasicModel struct {
	ID         int64      `gorm:"primary_key;auto_increment" json:"id"`
	Status     int32      `gorm:"type:smallint;default:2" json:"status"`
	CreateTime *time.Time `gorm:"column:create_time;default:current_timestamp;not null" json:"createTime"`
	UpdateTime *time.Time `gorm:"column:update_time;default:current_timestamp on update current_timestamp;not null" json:"updateTime"`
	DeleteTime *time.Time `json:"column:delete_time;deleteTime,omitempty"`
}

type Fields

type Fields map[string]interface{}

Jump to

Keyboard shortcuts

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