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
|
||||
|
||||
type (
|
||||
DeviceLocation struct {
|
||||
Name string `json:"name"`
|
||||
Latitude int `json:"latitude"`
|
||||
Longitude int `json:"longitude"`
|
||||
Elevation int `json:"elevation"`
|
||||
}
|
||||
|
||||
Device struct {
|
||||
Id string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Description string `json:"description"`
|
||||
Visibility string `json:"visibility"`
|
||||
Status string `json:"status"`
|
||||
Tags []string `json:"tags"`
|
||||
Location DeviceLocation `json:"location"`
|
||||
|
||||
// Service (gateway) to which this device belongs to
|
||||
// If device connects directly to Mainflux, use `main` (default)
|
||||
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"`
|
||||
Updated string `json:"updated"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user