2020-04-18 23:20:54 +02:00
|
|
|
package entity
|
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
import (
|
|
|
|
"github.com/photoprism/photoprism/pkg/media"
|
2022-09-28 09:01:17 +02:00
|
|
|
"github.com/sirupsen/logrus"
|
2022-04-15 09:42:07 +02:00
|
|
|
)
|
2021-09-03 19:02:26 +02:00
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Default values.
|
2020-04-18 23:20:54 +02:00
|
|
|
const (
|
2022-04-15 09:42:07 +02:00
|
|
|
Unknown = ""
|
|
|
|
UnknownYear = -1
|
|
|
|
UnknownMonth = -1
|
|
|
|
UnknownDay = -1
|
|
|
|
UnknownName = "Unknown"
|
|
|
|
UnknownTitle = UnknownName
|
|
|
|
UnknownID = "zz"
|
2021-09-03 19:02:26 +02:00
|
|
|
)
|
2020-05-15 15:29:56 +02:00
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Media content types.
|
2021-09-03 19:02:26 +02:00
|
|
|
const (
|
2022-04-13 22:17:59 +02:00
|
|
|
MediaUnknown = ""
|
2022-04-15 09:42:07 +02:00
|
|
|
MediaImage = string(media.Image)
|
|
|
|
MediaVector = string(media.Vector)
|
|
|
|
MediaAnimated = string(media.Animated)
|
|
|
|
MediaLive = string(media.Live)
|
|
|
|
MediaVideo = string(media.Video)
|
|
|
|
MediaRaw = string(media.Raw)
|
|
|
|
MediaText = string(media.Text)
|
2021-09-03 19:02:26 +02:00
|
|
|
)
|
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Storage root folders.
|
2021-09-03 19:02:26 +02:00
|
|
|
const (
|
2020-07-20 19:48:31 +02:00
|
|
|
RootUnknown = ""
|
|
|
|
RootOriginals = "/"
|
2020-06-07 10:09:35 +02:00
|
|
|
RootExamples = "examples"
|
|
|
|
RootSidecar = "sidecar"
|
|
|
|
RootImport = "import"
|
|
|
|
RootPath = "/"
|
2021-09-03 19:02:26 +02:00
|
|
|
)
|
2020-06-01 09:45:24 +02:00
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Event type.
|
2021-09-03 19:02:26 +02:00
|
|
|
const (
|
2020-06-01 09:45:24 +02:00
|
|
|
Created = "created"
|
2022-04-15 09:42:07 +02:00
|
|
|
Updated = "updated"
|
2020-06-01 09:45:24 +02:00
|
|
|
Deleted = "deleted"
|
2021-09-03 19:02:26 +02:00
|
|
|
)
|
2020-12-19 19:15:32 +01:00
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Photo stack states.
|
2021-09-03 19:02:26 +02:00
|
|
|
const (
|
2020-12-19 19:15:32 +01:00
|
|
|
IsStacked int8 = 1
|
|
|
|
IsStackable int8 = 0
|
|
|
|
IsUnstacked int8 = -1
|
2020-04-18 23:20:54 +02:00
|
|
|
)
|
2021-09-03 19:02:26 +02:00
|
|
|
|
2022-04-15 09:42:07 +02:00
|
|
|
// Sort options.
|
2021-09-03 19:02:26 +02:00
|
|
|
const (
|
2022-03-29 00:21:50 +02:00
|
|
|
SortOrderDefault = ""
|
2021-11-18 00:46:34 +01:00
|
|
|
SortOrderRelevance = "relevance"
|
2022-10-02 22:09:02 +02:00
|
|
|
SortOrderDuration = "duration"
|
2021-11-18 00:46:34 +01:00
|
|
|
SortOrderCount = "count"
|
2021-09-03 19:02:26 +02:00
|
|
|
SortOrderAdded = "added"
|
2022-03-29 00:21:50 +02:00
|
|
|
SortOrderImported = "imported"
|
2021-11-18 00:46:34 +01:00
|
|
|
SortOrderEdited = "edited"
|
2021-09-03 19:02:26 +02:00
|
|
|
SortOrderNewest = "newest"
|
|
|
|
SortOrderOldest = "oldest"
|
2021-11-18 00:46:34 +01:00
|
|
|
SortOrderPlace = "place"
|
|
|
|
SortOrderMoment = "moment"
|
2021-09-03 19:02:26 +02:00
|
|
|
SortOrderName = "name"
|
2021-11-18 00:46:34 +01:00
|
|
|
SortOrderPath = "path"
|
|
|
|
SortOrderSlug = "slug"
|
|
|
|
SortOrderCategory = "category"
|
2021-09-03 19:02:26 +02:00
|
|
|
SortOrderSimilar = "similar"
|
|
|
|
)
|
2022-09-02 21:30:50 +02:00
|
|
|
|
2022-09-28 09:01:17 +02:00
|
|
|
// Log levels.
|
2022-09-02 21:30:50 +02:00
|
|
|
const (
|
2022-09-28 09:01:17 +02:00
|
|
|
PanicLevel logrus.Level = iota
|
|
|
|
FatalLevel
|
|
|
|
ErrorLevel
|
|
|
|
WarnLevel
|
|
|
|
InfoLevel
|
|
|
|
DebugLevel
|
|
|
|
TraceLevel
|
2022-09-02 21:30:50 +02:00
|
|
|
)
|