model

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2025 License: MIT, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndCallback

func EndCallback(db *gorm.DB, typ string)

func GetValue

func GetValue(db *gorm.DB, typ int, key string) (string, error)

func SetValue

func SetValue(db *gorm.DB, typ int, key, value string) error

Types

type Cursor

type Cursor struct {
	model.Cursor
	ModelTime
}

func GetCursor

func GetCursor(db *gorm.DB, typ string) (*Cursor, error)

type Dict

type Dict struct {
	model.Dict
	ModelTime
}

type Enum added in v0.4.0

type Enum struct {
	model.Enum
	Model
}

type EnumValue added in v0.4.0

type EnumValue struct {
	model.EnumValue
	Model
}

type Model added in v0.3.9

type Model struct {
	ID        uint           `json:"id" gorm:"primaryKey"`
	CreatedAt time.Time      `json:"createdAt" gorm:"default:now()"`
	UpdatedAt time.Time      `json:"updatedAt"`
	DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
}

type ModelTime

type ModelTime struct {
	CreatedAt time.Time      `json:"createdAt" gorm:"default:now()"`
	UpdatedAt time.Time      `json:"updatedAt"`
	DeletedAt gorm.DeletedAt `json:"deletedAt,omitempty" gorm:"default:null"`
}

Jump to

Keyboard shortcuts

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