models

package
v0.26.8 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropDB

func DropDB() error

func InitDB

func InitDB() error

func UpgradeDB

func UpgradeDB(fromVersion, toVersion string) error

Types

type Template

type Template struct {
	ID        uint      `gorm:"primaryKey;autoIncrement" json:"id,omitempty"`
	Name      string    `gorm:"index" json:"name,omitempty"`
	Content   string    `gorm:"type:text" json:"content,omitempty"`
	Kind      string    `gorm:"index" json:"kind,omitempty"`
	Cluster   string    `gorm:"index" json:"cluster,omitempty"`
	IsGlobal  bool      `gorm:"index" json:"is_global,omitempty"`
	CreatedBy string    `gorm:"index" json:"created_by,omitempty"`
	CreatedAt time.Time `json:"created_at,omitempty" gorm:"<-:create"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

func (*Template) Delete

func (t *Template) Delete(params *dao.Params, ids string, queryFuncs ...func(*gorm.DB) *gorm.DB) error

func (*Template) GetOne

func (t *Template) GetOne(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) (*Template, error)

func (*Template) List

func (t *Template) List(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) ([]*Template, int64, error)

func (*Template) Save

func (t *Template) Save(params *dao.Params, queryFuncs ...func(*gorm.DB) *gorm.DB) error

func (*Template) TableName

func (t *Template) TableName() string

Jump to

Keyboard shortcuts

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