You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 regels
1.2 KiB

  1. package model
  2. type Tracker struct {
  3. ID string `json:"id" gorm:"primaryKey" validate:"required"`
  4. Name string `json:"name" validate:"required"`
  5. MAC string `json:"mac" validate:"required"`
  6. Status string `json:"status"`
  7. Model string `json:"model"`
  8. IP string `json:"ip"`
  9. Position string `json:"position"`
  10. X float32 `json:"x"`
  11. Y float32 `json:"y"`
  12. Notes string `json:"notes"`
  13. Floor string `json:"floor"`
  14. Building string `json:"building"`
  15. // MODIFICATO: Cambiato in string e rimosso ,string per accettare il testo nativo dell'API
  16. Battery string `json:"battery" gorm:"type:text"`
  17. BatteryThreshold uint32 `json:"batteryThreshold"`
  18. // MODIFICATO: Cambiato in string e rimosso ,string
  19. Temperature string `json:"temperature" gorm:"type:text"`
  20. // NUOVI CAMPI: Aggiunti per mappare completamente il payload dell'API cloud
  21. Acceleration string `json:"acceleration" gorm:"type:text"`
  22. HeartRate string `json:"heartRate" gorm:"type:text"`
  23. ButtonPress bool `json:"buttonPress" gorm:"type:boolean"`
  24. }