add pluginBundle backend api methods and SQL storage

This commit is contained in:
woodsaj
2015-12-03 23:43:55 +08:00
parent bd4cb549d6
commit c4a0fe0234
13 changed files with 219 additions and 23 deletions
+30 -4
View File
@@ -1,8 +1,34 @@
package models
import "time"
type PluginBundle struct {
Id int64
Type string
Org int64
Enabled bool
Id int64
Type string
OrgId int64
Enabled bool
JsonData map[string]interface{}
Created time.Time
Updated time.Time
}
// ----------------------
// COMMANDS
// Also acts as api DTO
type UpdatePluginBundleCmd struct {
Type string `json:"type" binding:"Required"`
Enabled bool `json:"enabled"`
JsonData map[string]interface{} `json:"jsonData"`
Id int64 `json:"-"`
OrgId int64 `json:"-"`
}
// ---------------------
// QUERIES
type GetPluginBundlesQuery struct {
OrgId int64
Result []*PluginBundle
}