Skip to content

Commit

Permalink
Merge pull request #112 from simagix/dbnames
Browse files Browse the repository at this point in the history
more brands on seeding
  • Loading branch information
simagix authored Aug 30, 2023
2 parents 850b590 + e549130 commit 521f736
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions seed.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,21 @@ func (f *Seed) SeedData(client *mongo.Client) error {
}

// SeedAllDemoData - seed data for demo
// models: {
// "_id": string
// "name": string,
// "description": string
// "year": integer
// }
//
// robots: {
// "_id": string
// "modelId": string
// "notes": string,
// "batteryPct": float,
// "tasks": [{"for": string, "minutesUsed": integer}]
// }
// models: {
// "_id": string
// "name": string,
// "description": string
// "year": integer
// }
//
// robots: {
// "_id": string
// "modelId": string
// "notes": string,
// "batteryPct": float,
// "tasks": [{"for": string, "minutesUsed": integer}]
// }
func (f *Seed) SeedAllDemoData(client *mongo.Client) error {
var err error
if err = f.SeedFavorites(client); err != nil {
Expand Down Expand Up @@ -359,7 +360,7 @@ func getVehicle() bson.M {
if delta == 0 {
used = false
}
brand := brands[rand.Intn(len(styles))]
brand := brands[rand.Intn(len(brands))]
color := colors[rand.Intn(len(colors))]
style := styles[rand.Intn(len(styles))]

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.2
1.3.3

0 comments on commit 521f736

Please sign in to comment.