package model
const (
SINGLE = iota
SITE
STYLE
PREVIEW
GLOBAL
OFFLINE_DOWNLOAD
INDEX
SSO
LDAP
S3
FTP
TRAFFIC
)
const (
PUBLIC = iota
PRIVATE
READONLY
DEPRECATED
)
type SettingItem struct {
Key string `json:"key" gorm:"primaryKey" binding:"required"`
Value string `json:"value"`
PreDefault string `json:"-" gorm:"-:all"`
Help string `json:"help"`
Type string `json:"type"`
Options string `json:"options"`
Group int `json:"group"`
Flag int `json:"flag"`
Index uint `json:"index"`
}
func (s SettingItem) IsDeprecated() bool {
return s.Flag == DEPRECATED
}