models

package
v0.0.0-...-a085c4d Latest Latest
Warning

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

Go to latest
Published: May 2, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func ConnectDatabase

func ConnectDatabase()

Types

type Readings

type Readings struct {
	RequestId int64  `json:"request_id" gorm:"primary_key"`
	SensorId  int64  `json:"sensor_id" sql:"type:int64 REFERENCES sensors(id)"`
	Data      string `json:"data"`
}

type Sensors

type Sensors struct {
	Id         int64  `json:"id" gorm:"primary_key"`
	Name       string `json:"name"`
	MacAddress string `json:"mac_address"`
}

Jump to

Keyboard shortcuts

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