Upstream sync

This commit is contained in:
Senad Uka
2023-09-18 12:27:40 +02:00
parent 9750aa2c37
commit 1f30f85787
30 changed files with 309 additions and 150 deletions

View File

@@ -10,30 +10,29 @@ type Location struct {
// ImportantInfo holds fields that are important for quick access.
type SensorData struct {
IMEI string `json:"imei"`
IMSI string `json:"imsi"`
Timestamp int64 `json:"timestamp"`
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
WifiLoc Location `json:"wifi_location"`
CellLoc Location `json:"cell_location"`
Temperature float64 `json:"temperature"`
IMEI string `json:"imei"`
IMSI string `json:"imsi"`
Timestamp int64 `json:"timestamp"`
Lat float64 `json:"lat"`
Lon float64 `json:"lon"`
WifiLoc Location `json:"wifi_location"`
CellLoc Location `json:"cell_location"`
Temperature float64 `json:"temperature"`
}
type DeviceInfo struct {
gorm.Model
RawJSON string `json:"raw_json" gorm:"type:json"`
SensorData
DeviceID uint
SensorData
DeviceID uint
}
func (DeviceInfo)Update() (bool, error) {
func (DeviceInfo) Update() (bool, error) {
return false, nil
}
func (DeviceInfo)Create() (bool, error) {
func (DeviceInfo) Create() (bool, error) {
return false, nil
}
func (DeviceInfo)Delete() (bool, error) {
func (DeviceInfo) Delete() (bool, error) {
return false, nil
}