photoprism/internal/entity/folder_fixtures.go
Michael Mayer 5d92ece264 Albums: Add category filter
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-30 21:11:56 +02:00

33 lines
772 B
Go

package entity
import (
"time"
)
var FolderFixtures = map[string]Folder{
"1990": {
Path: "1990",
FolderYear: 1990,
FolderMonth: 0,
FolderCountry: "zz",
CreatedAt: time.Date(2020, 3, 6, 2, 6, 51, 0, time.UTC),
UpdatedAt: time.Date(2020, 3, 28, 14, 6, 0, 0, time.UTC),
DeletedAt: nil,
},
"1990/04": {
Path: "1990/04",
FolderYear: 1990,
FolderMonth: 4,
FolderCountry: "zz",
CreatedAt: time.Date(2020, 3, 6, 2, 6, 51, 0, time.UTC),
UpdatedAt: time.Date(2020, 3, 28, 14, 6, 0, 0, time.UTC),
DeletedAt: nil,
},
}
// CreateFolderFixtures inserts known entities into the database for testing.
func CreateFolderFixtures() {
for _, entity := range FolderFixtures {
Db().Create(&entity)
}
}