1
Fork 0
photoview/api/graphql/models/media_exif.go

43 lines
774 B
Go
Raw Normal View History

2020-02-24 23:30:08 +01:00
package models
import (
"time"
)
type MediaEXIF struct {
Model
2022-03-28 17:08:30 +02:00
Description *string
2020-02-24 23:30:08 +01:00
Camera *string
Maker *string
Lens *string
DateShot *time.Time
Exposure *float64
2020-02-24 23:30:08 +01:00
Aperture *float64
Iso *int64
2020-02-24 23:30:08 +01:00
FocalLength *float64
Flash *int64
Orientation *int64
ExposureProgram *int64
GPSLatitude *float64
GPSLongitude *float64
2020-02-24 23:30:08 +01:00
}
func (MediaEXIF) TableName() string {
return "media_exif"
}
func (exif *MediaEXIF) Media() *Media {
panic("not implemented")
}
func (exif *MediaEXIF) Coordinates() *Coordinates {
if exif.GPSLatitude == nil || exif.GPSLongitude == nil {
return nil
}
return &Coordinates{
Latitude: *exif.GPSLatitude,
Longitude: *exif.GPSLongitude,
}
}