persistence

package
v0.0.0-...-03a60d5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 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 Road

type Road struct {
	gorm.Model
	RID          string `gorm:"unique"`
	RoadSegments []RoadSegment
}

Road persists the bare minimum we need to store about a road

type RoadSegment

type RoadSegment struct {
	gorm.Model
	SegmentID              string `gorm:"unique"`
	RoadID                 uint
	SurfaceTypePredictions []SurfaceTypePrediction
}

RoadSegment persists the bare minimum we need to store in a database about a road segment

type RoadSurfaceObserved

type RoadSurfaceObserved struct {
	gorm.Model
	RoadSegmentID         uint
	RoadSurfaceObservedID string
	SurfaceType           string
	Probability           float64
	Latitude              float64
	Longitude             float64
	Timestamp             time.Time
}

RoadSurfaceObserved is a model for a temporary table until a better schema is designed

type SurfaceTypePrediction

type SurfaceTypePrediction struct {
	gorm.Model
	RoadSegmentID uint
	SurfaceType   string
	Probability   float64
	Timestamp     time.Time
}

SurfaceTypePrediction is a model for a temporary table until a better schema is designed

type TrafficFlowObserved

type TrafficFlowObserved struct {
	gorm.Model
	TrafficFlowObservedID string
	DateObserved          time.Time
	DateObservedTo        time.Time
	DateObservedFrom      time.Time
	Latitude              float64
	Longitude             float64
	LaneID                int
	AverageVehicleSpeed   float64
	Intensity             int
	RoadSegmentID         uint
}

Jump to

Keyboard shortcuts

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