db

package
v0.0.0-...-2def81c Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() (*gorm.DB, error)

Types

type Device

type Device struct {
	gorm.Model
	UniqueLabel    string  `json:"uniquelabel"`
	Ownername      string  `json:"ownername"`
	Ownerphone     string  `json:"ownerphone"`
	Owneremail     string  `json:"owneremail"`
	Type           string  `json:"type" gorm:"default:car"`
	State          string  `json:"state" gorm:"default:stationary"`
	CurrentHolder  string  `json:"currentHolder" gorm:"default:owner"`
	Longitude      float32 `json:"longitude"`
	Latitude       float32 `json:"latitude"`
	ObsvrLongitude float32 `json:"obsvrlongitude"`
	ObsvrLatitude  float32 `json:"obsvrlatitude"`
	Missing        bool    `json:"missing" gorm:"default:false"`
}

type DeviceHistory

type DeviceHistory struct {
	gorm.Model
	UniqueLabel   string  `json:"uniquelabel"`
	Type          string  `json:"type" gorm:"default:car"`
	State         string  `json:"state" gorm:"default:stationary"`
	CurrentHolder string  `json:"currentHolder" gorm:"default:owner"`
	Longitude     float32 `json:"longitude"`
	Latitude      float32 `json:"latitude"`
	Missing       bool    `json:"missing" gorm:"default:false"`
	Notice        string  `json:"notice"`
}

Jump to

Keyboard shortcuts

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