models

package
v0.0.0-...-ba408d3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlatMap

func FlatMap(arr interface{}, fn interface{}) interface{}

func Pluck

func Pluck(m interface{}, key string) (result []string)

Types

type BaseModel

type BaseModel struct {
	ID string `gorm:"column:id;type:int8;primaryKey;" json:"id,omitempty"`
}

func (*BaseModel) BeforeCreate

func (b *BaseModel) BeforeCreate(tx *gorm.DB) (err error)

func (*BaseModel) BeforeSave

func (b *BaseModel) BeforeSave(tx *gorm.DB) (err error)

func (BaseModel) GetStringID

func (b BaseModel) GetStringID() string

type CommonTimestampsField

type CommonTimestampsField struct {
	CreatedAt *time.Time `gorm:"column:created_at;index;" json:"created_at,omitempty"`
	UpdatedAt *time.Time `gorm:"column:updated_at;index;" json:"updated_at,omitempty"`
}

type JsonArray

type JsonArray []string

func (*JsonArray) Scan

func (sa *JsonArray) Scan(value interface{}) error

func (JsonArray) Value

func (sa JsonArray) Value() (driver.Value, error)

type SoftDeleteTimestampField

type SoftDeleteTimestampField struct {
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;index;" json:"-"`
}

Jump to

Keyboard shortcuts

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