model

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	Type   string `json:"type" gorm:"primaryKey"`
	Cursor string
	Prev   string
	Next   string
}

type Dict

type Dict struct {
	Id      int    `gorm:"primaryKey"`
	Name    string `gorm:"comment:名称"`
	Group   int    `gorm:"comment:类型" gorm:"uniqueIndex:idx_group_key"`
	Key     string `gorm:"comment:键" gorm:"uniqueIndex:idx_group_key"`
	Value   string `gorm:"comment:值"`
	Comment string `gorm:"comment:注释"`
}

type Enum

type Enum struct {
	ID      int    `gorm:"primaryKey"`
	Name    string `gorm:"comment:名称"`
	Group   int    `gorm:"comment:枚举组" gorm:"uniqueIndex:idx_group_index"`
	Index   int    `gorm:"comment:索引" gorm:"uniqueIndex:idx_group_index"`
	Value   string `gorm:"comment:值" `
	Comment string `gorm:"comment:注释"`
}

type EnumItem

type EnumItem struct {
	Group   int    `gorm:"comment:枚举类型"`
	Index   int    `gorm:"comment:索引"`
	Comment string `gorm:"comment:注释"`
}

type ModelTime

type ModelTime struct {
	CreatedAt time.Time `json:"created_at" gorm:"default:current_timestamp"`
	UpdatedAt time.Time `json:"updated_at"`
	DeletedAt time.Time `json:"deleted_at" gorm:"default:null"`
}

type ModelTimeStamp

type ModelTimeStamp struct {
	CreatedAt int64 `json:"created_at" gorm:"default:current_timestamp"`
	UpdatedAt int64 `json:"updated_at" gorm:"default:current_timestamp"`
	DeletedAt int64 `json:"deleted_at" gorm:"index"`
}

type PostgresEnum

type PostgresEnum struct {
	ID    int `gorm:"primaryKey"`
	Enums datatypes.StringArray
}

Jump to

Keyboard shortcuts

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