photoprism/internal/entity/photo_keyword_fixtures.go
Michael Mayer 2156afd85a File browser: Implement clipboard; refactor entities and fixtures #260
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
2020-05-25 19:10:44 +02:00

29 lines
528 B
Go

package entity
type PhotoKeywordMap map[string]PhotoKeyword
var PhotoKeywordFixtures = PhotoKeywordMap{
"1": {
PhotoID: 1000004,
KeywordID: 1000000,
},
"2": {
PhotoID: 1000001,
KeywordID: 1000001,
},
"3": {
PhotoID: 1000000,
KeywordID: 1000000,
},
"4": {
PhotoID: 1000003,
KeywordID: 1000000,
},
}
// CreatePhotoKeywordFixtures inserts known entities into the database for testing.
func CreatePhotoKeywordFixtures() {
for _, entity := range PhotoKeywordFixtures {
Db().Create(&entity)
}
}