2020-05-01 13:11:42 +02:00
|
|
|
package entity
|
|
|
|
|
|
|
|
var PhotoLabelFixtures = map[string]PhotoLabel{
|
|
|
|
"1": {
|
|
|
|
PhotoID: 1000000,
|
|
|
|
LabelID: 1000001,
|
|
|
|
LabelSrc: "image",
|
|
|
|
Uncertainty: 38,
|
|
|
|
Photo: &PhotoFixture19800101_000002_D640C559,
|
|
|
|
Label: &LabelFixtureFlower,
|
|
|
|
},
|
|
|
|
"2": {
|
|
|
|
PhotoID: 1000000,
|
|
|
|
LabelID: 1000002,
|
2020-05-05 09:28:30 +02:00
|
|
|
LabelSrc: "manual",
|
2020-05-01 13:11:42 +02:00
|
|
|
Uncertainty: 38,
|
|
|
|
Photo: &PhotoFixture19800101_000002_D640C559,
|
|
|
|
Label: &LabelFixtureCake,
|
|
|
|
},
|
2020-05-05 09:28:30 +02:00
|
|
|
"3": {
|
|
|
|
PhotoID: 1000003,
|
|
|
|
LabelID: 1000006,
|
|
|
|
LabelSrc: "manual",
|
|
|
|
Uncertainty: 20,
|
|
|
|
Photo: &PhotoFixturePhoto03,
|
|
|
|
Label: &LabelFixtureUpdatePhotoLabel,
|
|
|
|
},
|
2020-05-01 13:11:42 +02:00
|
|
|
}
|
|
|
|
|
2020-05-08 14:18:11 +02:00
|
|
|
var PhotoLabelFixture1 = PhotoLabelFixtures["1"]
|
|
|
|
|
2020-05-01 13:11:42 +02:00
|
|
|
// CreatePhotoLabelFixtures inserts known entities into the database for testing.
|
|
|
|
func CreatePhotoLabelFixtures() {
|
|
|
|
for _, entity := range PhotoLabelFixtures {
|
|
|
|
Db().Create(&entity)
|
|
|
|
}
|
|
|
|
}
|