photoprism/internal/entity/location.go

72 lines
1.6 KiB
Go
Raw Normal View History

package entity
2018-09-16 19:09:40 +02: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 {
Model
2018-09-16 19:09:40 +02:00
LocDisplayName string
LocLat float64
LocLong float64
LocCategory string
LocType string
LocName string
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
}
func (m *Location) Label() string {
return locTypeLabels[m.LocType]
}