feat(apps): lots of more work on apps, changed app_plugin to app_settings in order to to confuse the app plugin model (definition) and app org settings

This commit is contained in:
Torkel Ödegaard
2016-01-10 21:37:11 +01:00
parent ab79348af5
commit c1e94e61d0
23 changed files with 272 additions and 220 deletions
@@ -2,9 +2,9 @@ package models
import "time"
type AppPlugin struct {
type AppSettings struct {
Id int64
Type string
AppId string
OrgId int64
Enabled bool
Pinned bool
@@ -18,19 +18,18 @@ type AppPlugin struct {
// COMMANDS
// Also acts as api DTO
type UpdateAppPluginCmd struct {
Type string `json:"type" binding:"Required"`
type UpdateAppSettingsCmd struct {
Enabled bool `json:"enabled"`
Pinned bool `json:"pinned"`
JsonData map[string]interface{} `json:"jsonData"`
Id int64 `json:"-"`
OrgId int64 `json:"-"`
AppId string `json:"-"`
OrgId int64 `json:"-"`
}
// ---------------------
// QUERIES
type GetAppPluginsQuery struct {
type GetAppSettingsQuery struct {
OrgId int64
Result []*AppPlugin
Result []*AppSettings
}