db

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableSystemView = "sp_dashboard_block_system"
	TableCustomView = "sp_dashboard_block"
)

table names

Functions

This section is empty.

Types

type CustomView

type CustomView struct {
	ID         string    `gorm:"column:id" json:"id"`
	Name       string    `gorm:"column:name" json:"name"`
	Version    string    `gorm:"column:version" json:"version"`
	Desc       string    `gorm:"column:desc" json:"desc"`
	Scope      string    `gorm:"column:scope" json:"scope"`
	ScopeID    string    `gorm:"column:scope_id" json:"scopeId"`
	ViewConfig string    `gorm:"column:view_config" json:"viewConfig"`
	DataConfig string    `gorm:"column:data_config" json:"dataConfig"`
	CreatedAt  time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at" json:"updatedAt"`
}

userBlock .

func (CustomView) TableName

func (CustomView) TableName() string

TableName .

type CustomViewDB

type CustomViewDB struct {
	*gorm.DB
}

CustomViewDB .

func (*CustomViewDB) Begin

func (db *CustomViewDB) Begin() *CustomViewDB

func (*CustomViewDB) GetByFields

func (db *CustomViewDB) GetByFields(fields map[string]interface{}) (*CustomView, error)

func (*CustomViewDB) ListByFields

func (db *CustomViewDB) ListByFields(fields map[string]interface{}) ([]*CustomView, error)

func (*CustomViewDB) UpdateView

func (db *CustomViewDB) UpdateView(id string, fields map[string]interface{}) error

type SystemView

type SystemView struct {
	ID         string    `gorm:"column:id" json:"id"`
	Name       string    `gorm:"column:name" json:"name"`
	Version    string    `gorm:"column:version" json:"version"`
	Desc       string    `gorm:"column:desc" json:"desc"`
	Scope      string    `gorm:"column:scope" json:"scope"`
	ScopeID    string    `gorm:"column:scope_id" json:"scopeId"`
	ViewConfig string    `gorm:"column:view_config" json:"viewConfig"`
	DataConfig string    `gorm:"column:data_config" json:"dataConfig"`
	CreatedAt  time.Time `gorm:"column:created_at" json:"createdAt"`
	UpdatedAt  time.Time `gorm:"column:updated_at" json:"updatedAt"`
}

systemBlock .

func (SystemView) TableName

func (SystemView) TableName() string

TableName .

type SystemViewDB

type SystemViewDB struct {
	*gorm.DB
}

SystemViewDB .

func (*SystemViewDB) Begin

func (db *SystemViewDB) Begin() *SystemViewDB

func (*SystemViewDB) GetByFields

func (db *SystemViewDB) GetByFields(fields map[string]interface{}) (*SystemView, error)

func (*SystemViewDB) ListByFields

func (db *SystemViewDB) ListByFields(fields map[string]interface{}) ([]*SystemView, error)

Jump to

Keyboard shortcuts

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