models

package
v0.0.0-...-e915dfe Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID          uint       `gorm:"primary_key" json:"-"`
	CreatedAt   time.Time  `gorm:"index" json:"created_at"`
	DetectedAt  time.Time  `gorm:"index" json:"detected_at"`
	DeletedAt   *time.Time `gorm:"index" json:"-"`
	NodeName    string     `gorm:"index" json:"node_name"`
	Address     string     `gorm:"index" gorm:"size:50; not null" json:"address"`
	CountryCode string     `gorm:"index" gorm:"size:5;" json:"country_code"`
	CountryName string     `json:"country_name"`
	Sensor      string     `gorm:"index" json:"sensor"`
	Rule        string     `gorm:"index" json:"rule"`
	Payload     string     `json:"payload"`
	ReportedAt  *time.Time `gorm:"index" json:"reported_at"`
}

type SensorState

type SensorState struct {
	ID           uint   `gorm:"primary_key" json:"-"`
	NodeName     string `gorm:"index" gorm:"column:node_name"`
	SensorName   string `gorm:"index" gorm:"column:sensor_name"`
	LastPosition int64  `gorm:"index" gorm:"column:last_position"`
}

Jump to

Keyboard shortcuts

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