models

package
v0.0.0-...-42c2596 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Temperature

type Temperature struct {
	gorm.Model
	Latitude   float64
	Longitude  float64
	Device     string
	Temp       float32
	Water      bool
	Timestamp  string
	Timestamp2 time.Time `gorm:"default:'1970-01-01T12:00:00Z'"`
}

Temperature defines the structure for our temperatures table

type TemperatureV2

type TemperatureV2 struct {
	gorm.Model
	Latitude  float64
	Longitude float64
	Device    string `gorm:"index;index:device_at_time,unique"`
	Temp      float32
	Water     bool
	Timestamp time.Time `gorm:"index:device_at_time,unique"`
}

TemperatureV2 defines the structure for our new temperatures table

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL