feat(ent): migrate DB settings in patches

This commit is contained in:
Aaron Liu
2025-06-22 10:31:33 +08:00
parent 8fe2889772
commit fec549f5ec
17 changed files with 762 additions and 377 deletions

View File

@ -176,42 +176,6 @@ type MapSetting struct {
// Viewer related
type (
ViewerAction string
ViewerType string
)
const (
ViewerActionView = "view"
ViewerActionEdit = "edit"
ViewerTypeBuiltin = "builtin"
ViewerTypeWopi = "wopi"
)
type Viewer struct {
ID string `json:"id"`
Type ViewerType `json:"type"`
DisplayName string `json:"display_name"`
Exts []string `json:"exts"`
Url string `json:"url,omitempty"`
Icon string `json:"icon,omitempty"`
WopiActions map[string]map[ViewerAction]string `json:"wopi_actions,omitempty"`
Props map[string]string `json:"props,omitempty"`
MaxSize int64 `json:"max_size,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Templates []NewFileTemplate `json:"templates,omitempty"`
}
type ViewerGroup struct {
Viewers []Viewer `json:"viewers"`
}
type NewFileTemplate struct {
Ext string `json:"ext"`
DisplayName string `json:"display_name"`
}
type (
SearchCategory string
)