2022-06-27 06:51:48 +00:00
|
|
|
package model
|
|
|
|
|
2022-06-27 07:51:02 +00:00
|
|
|
const (
|
|
|
|
SITE = iota
|
|
|
|
STYLE
|
|
|
|
PREVIEW
|
|
|
|
GLOBAL
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
PUBLIC = iota
|
|
|
|
PRIVATE
|
|
|
|
READONLY
|
|
|
|
DEPRECATED
|
|
|
|
)
|
|
|
|
|
2022-06-27 06:51:48 +00:00
|
|
|
type SettingItem struct {
|
|
|
|
Key string `json:"key" gorm:"primaryKey" binding:"required"` // unique key
|
|
|
|
Value string `json:"value"` // value
|
|
|
|
Help string `json:"help"` // help message
|
|
|
|
Type string `json:"type"` // string, number, bool, select
|
|
|
|
Values string `json:"values"` // values for select
|
|
|
|
Group int `json:"group"` // use to group setting in frontend
|
2022-06-27 07:51:02 +00:00
|
|
|
Flag int `json:"flag"` // 0 = public, 1 = private, 2 = deprecated, etc.
|
2022-06-27 06:51:48 +00:00
|
|
|
}
|