photoprism/internal/models/photo.go
2018-09-16 19:09:40 +02:00

29 lines
718 B
Go

package models
import (
"github.com/jinzhu/gorm"
"time"
)
type Photo struct {
gorm.Model
TakenAt time.Time
PhotoTitle string
PhotoDescription string `gorm:"type:text;"`
PhotoArtist string
PhotoColors string
PhotoVibrantColor string
PhotoMutedColor string
PhotoCanonicalName string
PhotoPerceptualHash string
PhotoFavorite bool
PhotoLat float64
PhotoLong float64
Location *Location
LocationID uint
Tags []*Tag `gorm:"many2many:photo_tags;"`
Files []*File
Albums []*Album `gorm:"many2many:album_photos;"`
Camera *Camera
CameraID uint
}