feat: initial setting items
This commit is contained in:
@ -1,5 +1,19 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
SITE = iota
|
||||
STYLE
|
||||
PREVIEW
|
||||
GLOBAL
|
||||
)
|
||||
|
||||
const (
|
||||
PUBLIC = iota
|
||||
PRIVATE
|
||||
READONLY
|
||||
DEPRECATED
|
||||
)
|
||||
|
||||
type SettingItem struct {
|
||||
Key string `json:"key" gorm:"primaryKey" binding:"required"` // unique key
|
||||
Value string `json:"value"` // value
|
||||
@ -7,5 +21,5 @@ type SettingItem struct {
|
||||
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
|
||||
Access int `json:"access"` // admin/guest/general
|
||||
Flag int `json:"flag"` // 0 = public, 1 = private, 2 = deprecated, etc.
|
||||
}
|
||||
|
Reference in New Issue
Block a user