summaryrefslogtreecommitdiff
path: root/src/hub/src/spreadspace.org/sfive/s5typesStore.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/hub/src/spreadspace.org/sfive/s5typesStore.go')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5typesStore.go26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5typesStore.go b/src/hub/src/spreadspace.org/sfive/s5typesStore.go
index 60dc6e7..cb73d2e 100644
--- a/src/hub/src/spreadspace.org/sfive/s5typesStore.go
+++ b/src/hub/src/spreadspace.org/sfive/s5typesStore.go
@@ -1,6 +1,8 @@
package sfive
-import "time"
+import (
+ "time"
+)
// compared to JSON DTOs, DB types are flattened, and use key-relations instead of collections
// this is very much not normalized at all, because I'm too lazy to type
@@ -12,8 +14,14 @@ const (
sourcesTn = "Sources"
clientdataUpdatesTn = "ClientDataUpdates"
dataUpdatesTn = "DataUpdates"
+ hubInfoTn = "HubInfo"
)
+type hubInfoDb struct {
+ Name string
+ Value string
+}
+
// stored in tagsTn
type tagDb struct {
Id int
@@ -45,13 +53,15 @@ type clientDataDb struct {
// stored in dataUpdatesTn
// in DB, StatisticsData/DataUpdate is flattened compared to JSON DTOs
type dataUpdateDb struct {
- Id int
- SourceId int // foreign key to sourcesTn
- StartTime int64 // time.Time
- Duration int64 // time.Duration
- ClientCount uint
- BytesReceived uint
- BytesSent uint
+ Id int
+ SourceId int // foreign key to sourcesTn
+ SourceHubUuid *string
+ SourceHubDataUpdateId *int
+ StartTime int64 // time.Time
+ Duration int64 // time.Duration
+ ClientCount uint
+ BytesReceived uint
+ BytesSent uint
}
func (self *SourceId) CopyFromSourceDb(value sourceDb) {