photoprism/internal/models/file.go
Michael Mayer 10859ee695 Moved perceptual hash from photo to file model; code clean-up (go fmt)
- Files might show different details of the full photo
2018-09-27 08:59:53 +02:00

25 lines
555 B
Go

package models
import (
"github.com/jinzhu/gorm"
)
type File struct {
gorm.Model
Photo *Photo
PhotoID uint
FilePrimary bool
FileMissing bool
FileName string
FileType string `gorm:"type:varchar(30)"`
FileMime string `gorm:"type:varchar(50)"`
FileWidth int
FileHeight int
FileOrientation int
FileAspectRatio float64
FileHash string `gorm:"type:varchar(100);unique_index"`
FilePerceptualHash string
FileNotes string `gorm:"type:text;"`
}