photoprism/photo.go

29 lines
597 B
Go
Raw Normal View History

2018-07-18 15:17:56 +02:00
package photoprism
import (
"github.com/jinzhu/gorm"
2018-08-09 23:10:05 +02:00
"time"
2018-07-18 15:17:56 +02:00
)
type Photo struct {
gorm.Model
2018-08-03 15:17:13 +02:00
Title string
Description string `gorm:"type:text;"`
2018-08-09 23:10:05 +02:00
TakenAt time.Time
2018-07-18 15:17:56 +02:00
CanonicalName string
PerceptualHash string
Tags []Tag `gorm:"many2many:photo_tags;"`
2018-07-18 15:17:56 +02:00
Files []File
Albums []Album `gorm:"many2many:album_photos;"`
Camera *Camera
CameraID uint
2018-07-18 15:17:56 +02:00
Author string
Lat float64
Long float64
2018-08-09 23:10:05 +02:00
Location *Location
LocationID uint
Favorite bool
2018-07-18 15:17:56 +02:00
Private bool
Deleted bool
}