photoprism/internal/entity/category_fixtures.go
Michael Mayer 8ccaaff4e5 Backend: Update label photo count and refactor entity fixtures
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-10 19:43:49 +02:00

17 lines
416 B
Go

package entity
var CategoryFixtures = map[string]Category{
"flower_landscape": {
LabelID: 1000001,
Label: LabelFixtures.Pointer("flower"),
CategoryID: 1000000,
Category: LabelFixtures.Pointer("landscape"),
},
}
// CreateCategoryFixtures inserts known entities into the database for testing.
func CreateCategoryFixtures() {
for _, entity := range CategoryFixtures {
Db().Create(&entity)
}
}