photoprism/internal/entity/photo_fixtures.go

989 lines
30 KiB
Go
Raw Normal View History

2020-04-30 17:26:36 +02:00
package entity
import (
"time"
)
2020-05-08 14:18:11 +02:00
var editTime = time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC)
2020-05-14 14:17:12 +02:00
var deleteTime = time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC)
2020-05-08 14:18:11 +02:00
type PhotoMap map[string]Photo
func (m PhotoMap) Get(name string) Photo {
if result, ok := m[name]; ok {
return result
}
return Photo{PhotoName: name}
}
func (m PhotoMap) Pointer(name string) *Photo {
if result, ok := m[name]; ok {
return &result
}
return &Photo{PhotoName: name}
}
var PhotoFixtures = PhotoMap{
2020-04-30 17:26:36 +02:00
"19800101_000002_D640C559": {
ID: 1000000,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0yh7",
2020-04-30 17:26:36 +02:00
TakenAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
TakenAtLocal: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
TakenSrc: "exif",
PhotoTitle: "",
TitleSrc: "",
PhotoDescription: "photo description lake",
2020-04-30 17:26:36 +02:00
PhotoPath: "2790/02",
PhotoName: "19800101_000002_D640C559",
2020-05-14 14:17:12 +02:00
PhotoQuality: 4,
2020-04-30 17:26:36 +02:00
PhotoResolution: 2,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: 48.519234,
PhotoLng: 9.057997,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
2020-05-13 19:46:49 +02:00
PhotoFNumber: 5,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-04-30 17:26:36 +02:00
CameraSerial: "",
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2790,
PhotoMonth: 2,
Details: DetailsFixtures.Get("lake", 1000000),
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
2020-05-11 14:41:20 +02:00
Camera: CameraFixtures.Pointer("canon-eos-6d"),
2020-05-13 19:46:49 +02:00
Lens: LensFixtures.Pointer("lens-f-380"),
2020-04-30 17:26:36 +02:00
Location: nil,
2020-05-13 19:46:49 +02:00
Place: PlaceFixtures.Pointer("teotihuacan"),
2020-04-30 17:26:36 +02:00
Links: []Link{},
2020-05-14 14:17:12 +02:00
Keywords: []Keyword{
KeywordFixtures.Get("bridge"),
},
2020-05-11 14:41:20 +02:00
Albums: []Album{
AlbumFixtures.Get("holiday-2030"),
},
Files: []File{},
Labels: []PhotoLabel{
LabelFixtures.PhotoLabel(1000000, "flower", 38, "image"),
LabelFixtures.PhotoLabel(1000000, "cake", 38, "manual"),
},
CreatedAt: time.Date(2009, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
2020-04-30 17:26:36 +02:00
},
"Photo01": {
ID: 1000001,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0yh8",
2020-05-08 14:18:11 +02:00
TakenAt: time.Date(2006, 1, 1, 2, 0, 0, 0, time.UTC),
TakenAtLocal: time.Date(2006, 1, 1, 2, 0, 0, 0, time.UTC),
2020-04-30 17:26:36 +02:00
TakenSrc: "exif",
PhotoTitle: "",
TitleSrc: "",
PhotoDescription: "photo description blacklist",
2020-04-30 17:26:36 +02:00
PhotoPath: "2790/02",
PhotoName: "Photo01",
PhotoQuality: 3,
PhotoResolution: 2,
2020-05-01 14:13:59 +02:00
PhotoFavorite: true,
2020-04-30 17:26:36 +02:00
PhotoPrivate: false,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: 48.519234,
PhotoLng: 9.057997,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-04-30 17:26:36 +02:00
CameraSerial: "",
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2790,
PhotoMonth: 2,
Details: Details{},
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
2020-05-11 14:41:20 +02:00
Camera: CameraFixtures.Pointer("canon-eos-6d"),
2020-05-13 19:46:49 +02:00
Lens: LensFixtures.Pointer("lens-f-380"),
2020-04-30 17:26:36 +02:00
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{},
CreatedAt: time.Date(2009, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo02": {
ID: 1000002,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0yh9",
2020-04-30 17:26:36 +02:00
TakenAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
TakenAtLocal: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
TakenSrc: "exif",
PhotoTitle: "",
TitleSrc: "",
PhotoPath: "1990/03",
PhotoName: "Photo02",
PhotoQuality: 3,
PhotoResolution: 2,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: 48.519234,
PhotoLng: 9.057997,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-04-30 17:26:36 +02:00
CameraSerial: "",
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 1990,
PhotoMonth: 3,
Details: Details{},
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
Camera: nil,
2020-05-13 19:46:49 +02:00
Lens: LensFixtures.Pointer("lens-f-380"),
2020-04-30 17:26:36 +02:00
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000002, "cake", 20, "image")},
2020-04-30 17:26:36 +02:00
CreatedAt: time.Date(2009, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo03": {
ID: 1000003,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0yh0",
2020-04-30 17:26:36 +02:00
TakenAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
2020-05-11 17:01:05 +02:00
TakenAtLocal: time.Time{},
2020-04-30 17:26:36 +02:00
TakenSrc: "exif",
PhotoTitle: "",
TitleSrc: "",
PhotoPath: "1990/04",
PhotoName: "Photo02",
PhotoQuality: 3,
PhotoResolution: 2,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: 48.519234,
PhotoLng: 9.057997,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-04-30 17:26:36 +02:00
CameraSerial: "",
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 1990,
PhotoMonth: 4,
Details: Details{},
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{
LabelFixtures.PhotoLabel(1000003, "cow", 20, "image"),
LabelFixtures.PhotoLabel(1000003, "updatePhotoLabel", 20, "manual"),
},
CreatedAt: time.Date(2009, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2008, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
2020-04-30 17:26:36 +02:00
},
"Photo04": {
ID: 1000004,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0y11",
2020-04-30 17:26:36 +02:00
TakenAt: time.Date(2014, 7, 17, 15, 42, 12, 0, time.UTC),
TakenAtLocal: time.Date(2014, 7, 17, 15, 42, 12, 0, time.UTC),
TakenSrc: "exif",
PhotoTitle: "Neckarbrücke",
TitleSrc: "",
PhotoPath: "2014/07",
PhotoName: "Photo02",
PhotoQuality: 3,
PhotoResolution: 2,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: 48.519234,
PhotoLng: 9.057997,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-04-30 17:26:36 +02:00
CameraSerial: "",
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
2020-05-13 19:46:49 +02:00
Camera: CameraFixtures.Pointer("canon-eos-6d"),
Lens: LensFixtures.Pointer("lens-f-380"),
Location: &LocationFixturesMexico,
Place: PlaceFixtures.Pointer("teotihuacan"),
2020-04-30 17:26:36 +02:00
Links: []Link{},
2020-05-11 14:41:20 +02:00
Keywords: []Keyword{
KeywordFixtures.Get("bridge"),
},
Albums: []Album{
AlbumFixtures.Get("berlin-2019"),
},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000004, "batchdelete", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
2020-04-30 17:26:36 +02:00
},
"Photo05": {
ID: 1000005,
2020-05-01 14:13:59 +02:00
PhotoUUID: "pt9jtdre2lvl0y12",
2020-04-30 17:26:36 +02:00
TakenAt: time.Date(2015, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2015, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "exif",
PhotoTitle: "Reunion",
TitleSrc: "",
PhotoPath: "2014/07",
PhotoName: "Photo02",
PhotoQuality: 3,
PhotoResolution: 2,
PhotoFavorite: false,
2020-05-14 14:17:12 +02:00
PhotoPrivate: true,
PhotoVideo: false,
2020-04-30 17:26:36 +02:00
PhotoLat: -21.342636,
PhotoLng: 55.466944,
PhotoAltitude: 0,
2020-05-01 14:13:59 +02:00
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
2020-04-30 17:26:36 +02:00
PhotoExposure: "",
2020-05-01 14:13:59 +02:00
CameraID: 0,
2020-05-11 17:01:05 +02:00
CameraSerial: "123",
2020-04-30 17:26:36 +02:00
CameraSrc: "",
2020-05-01 14:13:59 +02:00
LensID: 0,
2020-04-30 17:26:36 +02:00
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
2020-05-04 17:54:42 +02:00
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-04 17:54:42 +02:00
DescriptionSrc: "",
2020-05-13 19:46:49 +02:00
Camera: CameraFixtures.Pointer("canon-eos-6d"),
Lens: LensFixtures.Pointer("lens-f-380"),
Location: &LocationFixturesMexico,
Place: PlaceFixtures.Pointer("teotihuacan"),
2020-05-04 17:54:42 +02:00
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000005, "updateLabel", 20, "image")},
2020-05-04 17:54:42 +02:00
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo06": {
ID: 1000006,
PhotoUUID: "pt9jtdre2lvl0y13",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "exif",
PhotoTitle: "ToBeUpdated",
TitleSrc: "exif",
PhotoPath: "2016/11",
PhotoName: "UpdatePhoto",
2020-05-08 14:18:11 +02:00
PhotoQuality: 0,
2020-05-04 17:54:42 +02:00
PhotoResolution: 2,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-04 17:54:42 +02:00
PhotoLat: -21.342636,
PhotoLng: 55.466944,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
2020-04-30 17:26:36 +02:00
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-04-30 17:26:36 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000006, "updatePhotoLabel", 20, "image")},
2020-04-30 17:26:36 +02:00
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
2020-05-08 14:18:11 +02:00
"Photo07": {
ID: 1000007,
PhotoUUID: "pt9jtdre2lvl0y14",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "ToBeUpdated",
TitleSrc: "exif",
PhotoPath: "2016/11",
PhotoName: "UpdatePhoto",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-08 14:18:11 +02:00
PhotoLat: -21.342636,
PhotoLng: 55.466944,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "zz",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-08 14:18:11 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000007, "landscape", 20, "image")},
2020-05-08 14:18:11 +02:00
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: &editTime,
DeletedAt: nil,
},
2020-05-08 15:46:16 +02:00
"Photo08": {
ID: 1000008,
PhotoUUID: "pt9jtdre2lvl0y15",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Black beach",
TitleSrc: "exif",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
2020-05-08 15:46:16 +02:00
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
2020-05-11 17:01:05 +02:00
PlaceID: "85d1ea7d382c",
LocationID: "85d1ea7d382c",
2020-05-12 13:52:09 +02:00
LocationSrc: "manual",
2020-05-08 15:46:16 +02:00
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-08 15:46:16 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
2020-05-08 15:46:16 +02:00
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
2020-05-11 17:01:05 +02:00
"Photo09": {
ID: 1000009,
PhotoUUID: "pt9jtdre2lvl0y16",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "85d1ea7d382c",
LocationID: "85d1ea7d382c",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesMexico,
Place: PlaceFixtures.Pointer("teotihuacan"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo10": {
ID: 1000010,
PhotoUUID: "pt9jtdre2lvl0y17",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesHassloch,
Place: PlaceFixtures.Pointer("holidaypark"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo11": {
ID: 1000011,
PhotoUUID: "pt9jtdre2lvl0y18",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesEmptyNameLongCity,
Place: PlaceFixtures.Pointer("emptyNameLongCity"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo12": {
ID: 1000012,
PhotoUUID: "pt9jtdre2lvl0y19",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesEmptyNameShortCity,
Place: PlaceFixtures.Pointer("emptyNameShortCity"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo13": {
ID: 1000013,
PhotoUUID: "pt9jtdre2lvl0y20",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesVeryLongLocName,
Place: PlaceFixtures.Pointer("veryLongLocName"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000008, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo14": {
ID: 1000014,
PhotoUUID: "pt9jtdre2lvl0y21",
TakenAt: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2016, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Title",
TitleSrc: "",
PhotoPath: "2016/11",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
2020-05-11 17:01:05 +02:00
PhotoLat: 0,
PhotoLng: 0,
PhotoAltitude: 0,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "",
TimeZone: "",
PhotoCountry: "zz",
PhotoYear: 2014,
PhotoMonth: 7,
Details: Details{},
2020-05-11 17:01:05 +02:00
DescriptionSrc: "",
Camera: nil,
Lens: nil,
Location: &LocationFixturesMediumLongLocName,
Place: PlaceFixtures.Pointer("mediumLongLocName"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
2020-05-12 11:51:28 +02:00
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(1000014, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo15": {
ID: 1000015,
PhotoUUID: "pt9jtdre2lvl0y22",
TakenAt: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "location",
PhotoTitle: "TitleToBeSet",
TitleSrc: "location",
PhotoDescription: "photo description blacklist",
2020-05-12 11:51:28 +02:00
PhotoPath: "",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
PhotoLat: 1.234,
PhotoLng: 4.321,
PhotoAltitude: 3,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "location",
TimeZone: "",
PhotoCountry: "",
PhotoYear: 0,
PhotoMonth: 0,
Details: DetailsFixtures.Get("blacklist", 1000015),
2020-05-12 11:51:28 +02:00
DescriptionSrc: "location",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(10000015, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo16": {
ID: 1000016,
PhotoUUID: "pt9jtdre2lvl0y23",
TakenAt: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "ForDeletion",
TitleSrc: "",
PhotoPath: "",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: false,
PhotoPrivate: false,
PhotoVideo: false,
PhotoLat: 1.234,
PhotoLng: 4.321,
PhotoAltitude: 3,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
2020-05-13 11:51:51 +02:00
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "location",
TimeZone: "",
PhotoCountry: "",
PhotoYear: 0,
PhotoMonth: 0,
Details: DetailsFixtures.Get("lake", 1000015),
2020-05-13 11:51:51 +02:00
DescriptionSrc: "location",
Camera: nil,
Lens: nil,
Location: nil,
Place: nil,
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{LabelFixtures.PhotoLabel(10000015, "landscape", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo17": {
ID: 1000017,
PhotoUUID: "pt9jtdre2lvl0y24",
TakenAt: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "Quality1FavoriteTrue",
TitleSrc: "",
PhotoPath: "",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: true,
PhotoPrivate: false,
PhotoVideo: false,
PhotoLat: 1.234,
PhotoLng: 4.321,
PhotoAltitude: 3,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
2020-05-12 11:51:28 +02:00
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "location",
TimeZone: "",
PhotoCountry: "",
PhotoYear: 0,
PhotoMonth: 0,
Details: DetailsFixtures.Get("lake", 1000015),
2020-05-12 11:51:28 +02:00
DescriptionSrc: "location",
2020-05-13 19:46:49 +02:00
Camera: CameraFixtures.Pointer("canon-eos-6d"),
Lens: LensFixtures.Pointer("lens-f-380"),
Location: &LocationFixturesMexico,
Place: PlaceFixtures.Pointer("teotihuacan"),
2020-05-12 11:51:28 +02:00
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
2020-05-14 14:17:12 +02:00
Labels: []PhotoLabel{
LabelFixtures.PhotoLabel(10000015, "landscape", 20, "image"),
LabelFixtures.PhotoLabel(10000018, "likeLabel", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: nil,
},
"Photo18": {
ID: 1000018,
PhotoUUID: "pt9jtdre2lvl0y25",
TakenAt: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenAtLocal: time.Date(2013, 11, 11, 9, 7, 18, 0, time.UTC),
TakenSrc: "",
PhotoTitle: "ArchivedChroma0",
TitleSrc: "",
PhotoPath: "",
PhotoName: "",
PhotoQuality: 0,
PhotoResolution: 0,
PhotoFavorite: true,
PhotoPrivate: false,
PhotoVideo: false,
PhotoLat: 1.234,
PhotoLng: 4.321,
PhotoAltitude: 3,
PhotoIso: 0,
PhotoFocalLength: 0,
PhotoFNumber: 0,
PhotoExposure: "",
CameraID: 0,
CameraSerial: "",
CameraSrc: "",
LensID: 0,
PlaceID: "",
LocationID: "",
LocationSrc: "location",
TimeZone: "",
PhotoCountry: "",
PhotoYear: 0,
PhotoMonth: 0,
Details: DetailsFixtures.Get("lake", 1000015),
2020-05-14 14:17:12 +02:00
DescriptionSrc: "location",
Camera: CameraFixtures.Pointer("canon-eos-6d"),
Lens: LensFixtures.Pointer("lens-f-380"),
Location: &LocationFixturesMexico,
Place: PlaceFixtures.Pointer("teotihuacan"),
Links: []Link{},
Keywords: []Keyword{},
Albums: []Album{},
Files: []File{},
Labels: []PhotoLabel{
LabelFixtures.PhotoLabel(10000018, "landscape", 20, "image"),
LabelFixtures.PhotoLabel(10000018, "likeLabel", 20, "image")},
CreatedAt: time.Date(2019, 1, 1, 0, 0, 0, 0, time.UTC),
UpdatedAt: time.Date(2020, 1, 1, 0, 0, 0, 0, time.UTC),
EditedAt: nil,
DeletedAt: &deleteTime,
2020-05-11 17:01:05 +02:00
},
2020-04-30 17:26:36 +02:00
}
// CreatePhotoFixtures inserts known entities into the database for testing.
2020-05-01 14:13:59 +02:00
func CreatePhotoFixtures() {
2020-04-30 17:26:36 +02:00
for _, entity := range PhotoFixtures {
2020-05-01 14:13:59 +02:00
Db().Create(&entity)
2020-04-30 17:26:36 +02:00
}
}