models

package
v1.4.7 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeDataType

func HumanizeDataType(dataType DataType) string

Types

type DataType

type DataType int

DataType is a list of data types used for settings

func DataTypeFromString

func DataTypeFromString(dataType string) DataType

func (DataType) Boolean

func (DataType) Boolean() DataType

Boolean is a type

func (DataType) DateTime

func (DataType) DateTime() DataType

DateTime is a type

func (DataType) File

func (DataType) File() DataType

File is a type

func (DataType) Float

func (DataType) Float() DataType

Float is a type

func (DataType) Image

func (DataType) Image() DataType

Image is a type

func (DataType) Integer

func (DataType) Integer() DataType

Integer is a type

func (DataType) String

func (DataType) String() DataType

String is a type

type Setting

type Setting struct {
	core.Model
	Name         string          `uadmin:"list,search" uadminform:"RequiredFieldOptions"`
	Value        string          `uadmin:"list" uadminform:"DynamicTypeFieldOptions"`
	DefaultValue string          `uadmin:"list" uadminform:"DynamicTypeFieldOptions"`
	DataType     DataType        `uadmin:"list,search" uadminform:"RequiredSelectFieldOptions"`
	Help         string          `uadmin:"list,search" sql:"type:text;"`
	Category     SettingCategory `uadmin:"list,search" uadminform:"FkRequiredFieldOptions"`
	CategoryID   uint
	Code         string `uadmin:"search" uadminform:"ReadonlyField"`
}

Setting model stored system settings

func (*Setting) GetRealWidget

func (s *Setting) GetRealWidget() core.IWidget

func (*Setting) String

func (s *Setting) String() string

type SettingCategory

type SettingCategory struct {
	core.Model
	Name string `uadmin:"list"`
	Icon string `uadminform:"ImageFormOptions" `
}

SettingCategory is a category for system settings

func (*SettingCategory) String

func (m *SettingCategory) String() string

Jump to

Keyboard shortcuts

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