models

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 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          `gomonolith:"list,search" gomonolithform:"RequiredFieldOptions"`
	Value        string          `gomonolith:"list" gomonolithform:"DynamicTypeFieldOptions"`
	DefaultValue string          `gomonolith:"list" gomonolithform:"DynamicTypeFieldOptions"`
	DataType     DataType        `gomonolith:"list,search" gomonolithform:"RequiredSelectFieldOptions"`
	Help         string          `gomonolith:"list,search" sql:"type:text;"`
	Category     SettingCategory `gomonolith:"list,search" gomonolithform:"FkRequiredFieldOptions"`
	CategoryID   uint
	Code         string `gomonolith:"search" gomonolithform:"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 `gomonolith:"list"`
	Icon string `gomonolithform:"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