settings

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type ParamType

type ParamType string
const (
	ParamTypeInt     ParamType = "int"
	ParamTypeString  ParamType = "string"
	ParamTypeDecimal ParamType = "decimal"
	ParamTypeJson    ParamType = "json"
	ParamTypeDate    ParamType = "date"
	ParamTypeTime    ParamType = "time"
)

type Setting

type Setting struct {
	Id          int          `xorm:"pk autoincr int" json:"id"`
	Code        string       `xorm:"varchar(100) notnull unique(code)" json:"code"`
	Name        string       `xorm:"varchar(250)" json:"name"`
	Type        ParamType    `xorm:"varchar(20)" json:"type"`
	Value       string       `xorm:"text" json:"value"`
	Note        string       `xorm:"varchar(500)" json:"note"`
	Status      types.Status `xorm:"default(0) notnull" json:"status"`
	EffectiveSt utils.Time   `xorm:"timestamp" json:"effective_st"`
	EffectiveEt utils.Time   `xorm:"timestamp" json:"effective_et"`
	CreateTime  utils.Time   `xorm:"timestamp created" json:"create_time"`
	UpdateTime  utils.Time   `xorm:"timestamp updated" json:"update_time"`
}

func (*Setting) Date

func (s *Setting) Date() time.Time

func (*Setting) Int

func (s *Setting) Int() int

func (*Setting) Time

func (s *Setting) Time() time.Time

Jump to

Keyboard shortcuts

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