2019-12-11 16:55:18 +01:00
|
|
|
package entity
|
2018-09-16 19:09:40 +02:00
|
|
|
|
2019-12-16 20:22:46 +01:00
|
|
|
var locTypeLabels = map[string]string{
|
|
|
|
"bay": "bay",
|
|
|
|
"art": "art exhibition",
|
|
|
|
"fire station": "fire station",
|
|
|
|
"hairdresser": "hairdresser",
|
|
|
|
"cape": "cape",
|
|
|
|
"coastline": "coastline",
|
|
|
|
"cliff": "cliff",
|
|
|
|
"wetland": "wetland",
|
|
|
|
"nature reserve": "nature reserve",
|
|
|
|
"beach": "beach",
|
|
|
|
"cafe": "cafe",
|
|
|
|
"internet cafe": "cafe",
|
|
|
|
"ice cream": "ice cream parlor",
|
|
|
|
"bistro": "restaurant",
|
|
|
|
"restaurant": "restaurant",
|
|
|
|
"ship": "ship",
|
|
|
|
"wholesale": "shop",
|
|
|
|
"food": "shop",
|
|
|
|
"supermarket": "supermarket",
|
|
|
|
"florist": "florist",
|
|
|
|
"pharmacy": "pharmacy",
|
|
|
|
"seafood": "seafood",
|
|
|
|
"clothes": "clothing store",
|
|
|
|
"residential": "residential area",
|
|
|
|
"museum": "museum",
|
|
|
|
"castle": "castle",
|
|
|
|
"terminal": "airport terminal",
|
|
|
|
"ferry terminal": "ferry terminal",
|
|
|
|
"bridge": "bridge",
|
|
|
|
"university": "university",
|
|
|
|
"mall": "mall",
|
|
|
|
"marina": "marina",
|
|
|
|
"garden": "garden",
|
|
|
|
"pedestrian": "shopping area",
|
|
|
|
"bunker": "bunker",
|
|
|
|
"viewpoint": "viewpoint",
|
|
|
|
"train station": "train station",
|
|
|
|
"farm": "farm",
|
|
|
|
}
|
|
|
|
|
2018-11-06 19:02:03 +01:00
|
|
|
// Photo location
|
2018-09-16 19:09:40 +02:00
|
|
|
type Location struct {
|
2019-06-04 18:26:35 +02:00
|
|
|
Model
|
2018-09-16 19:09:40 +02:00
|
|
|
LocDisplayName string
|
|
|
|
LocLat float64
|
|
|
|
LocLong float64
|
|
|
|
LocCategory string
|
|
|
|
LocType string
|
|
|
|
LocName string
|
2018-09-26 15:00:12 +02:00
|
|
|
LocHouseNr string
|
|
|
|
LocStreet string
|
|
|
|
LocSuburb string
|
2018-09-16 19:09:40 +02:00
|
|
|
LocCity string
|
|
|
|
LocPostcode string
|
|
|
|
LocCounty string
|
|
|
|
LocState string
|
|
|
|
LocCountry string
|
|
|
|
LocCountryCode string
|
2018-09-19 09:20:57 +02:00
|
|
|
LocDescription string `gorm:"type:text;"`
|
|
|
|
LocNotes string `gorm:"type:text;"`
|
|
|
|
LocPhoto *Photo
|
|
|
|
LocPhotoID uint
|
2018-09-16 19:09:40 +02:00
|
|
|
LocFavorite bool
|
2018-09-17 18:40:57 +02:00
|
|
|
}
|
2019-12-16 20:22:46 +01:00
|
|
|
|
|
|
|
func (m *Location) Label() string {
|
|
|
|
return locTypeLabels[m.LocType]
|
|
|
|
}
|