2020-04-30 17:26:03 +02:00
|
|
|
package entity
|
|
|
|
|
2020-05-10 19:43:49 +02:00
|
|
|
type CountryMap map[string]Country
|
|
|
|
|
|
|
|
var CountryFixtures = CountryMap{
|
2020-05-11 14:41:20 +02:00
|
|
|
"germany": {
|
2020-04-30 17:26:03 +02:00
|
|
|
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.
|
2020-05-01 14:13:59 +02:00
|
|
|
func CreateCountryFixtures() {
|
2020-04-30 17:26:03 +02:00
|
|
|
for _, entity := range CountryFixtures {
|
2020-05-01 14:13:59 +02:00
|
|
|
Db().Create(&entity)
|
2020-04-30 17:26:03 +02:00
|
|
|
}
|
|
|
|
}
|