photoprism/internal/entity/country_fixtures.go
2020-05-11 14:49:53 +02:00

23 lines
546 B
Go

package entity
type CountryMap map[string]Country
var CountryFixtures = CountryMap{
"germany": {
ID: "de",
CountrySlug: "germany",
CountryName: "Germany",
CountryDescription: "Country description",
CountryNotes: "Country Notes",
CountryPhoto: nil,
CountryPhotoID: 0,
New: false,
},
}
// CreateCountryFixtures inserts known entities into the database for testing.
func CreateCountryFixtures() {
for _, entity := range CountryFixtures {
Db().Create(&entity)
}
}