rename locations to places (#38)

* rename locations to places

* update failing things

Co-authored-by: Janos Dobronszki <dobronszki@gmail.com>
This commit is contained in:
Asim Aslam
2021-01-13 13:08:19 +00:00
committed by GitHub
parent a8e56e5e9e
commit ef2f313e33
15 changed files with 662 additions and 882 deletions

26
places/model/location.go Normal file
View File

@@ -0,0 +1,26 @@
package model
import (
"time"
)
type Location struct {
ID string
PlaceID string `gorm:"index"`
Latitude float64
Longitude float64
Timestamp time.Time
}
// use the place id for the geoindex so only one result is returned per place
func (l *Location) Id() string {
return l.PlaceID
}
func (l *Location) Lat() float64 {
return l.Latitude
}
func (l *Location) Lon() float64 {
return l.Longitude
}