mirror of
https://github.com/mainflux/mainflux.git
synced 2025-04-29 13:49:28 +08:00
Added service
field. Simplified device
model.
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
This commit is contained in:
parent
62c43f1ba4
commit
96fd2bf2b5
@ -9,22 +9,21 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
type (
|
type (
|
||||||
DeviceLocation struct {
|
|
||||||
Name string `json:"name"`
|
|
||||||
Latitude int `json:"latitude"`
|
|
||||||
Longitude int `json:"longitude"`
|
|
||||||
Elevation int `json:"elevation"`
|
|
||||||
}
|
|
||||||
|
|
||||||
Device struct {
|
Device struct {
|
||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
|
|
||||||
Description string `json:"description"`
|
Description string `json:"description"`
|
||||||
Visibility string `json:"visibility"`
|
|
||||||
Status string `json:"status"`
|
// Service (gateway) to which this device belongs to
|
||||||
Tags []string `json:"tags"`
|
// If device connects directly to Mainflux, use `main` (default)
|
||||||
Location DeviceLocation `json:"location"`
|
Service string `json:"service"`
|
||||||
|
|
||||||
|
Online bool `json:"online"`
|
||||||
|
ConnectedAt string `json:"connected_at"`
|
||||||
|
DisonnectedAt string `json:"disconnected_at"`
|
||||||
|
|
||||||
|
Channels []Channel `json:"channels"`
|
||||||
|
|
||||||
Created string `json:"created"`
|
Created string `json:"created"`
|
||||||
Updated string `json:"updated"`
|
Updated string `json:"updated"`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user