package fakers import ( "github.com/google/uuid" "gorm.io/gorm" "moretcgshop/app/models" "time" ) func CategoryFaker(db *gorm.DB) []*models.Category { sections, _ := models.GetSection(db) var res []*models.Category for _, section := range sections { var categories []string = []string{"Einzelkarten", "Booster", "Booster Displays"} var temp *models.Category for _, cat := range categories { temp = &models.Category{ ID: uuid.New().String(), Name: cat, Section: section, CreatedAt: time.Time{}, UpdatedAt: time.Time{}, } res = append(res, temp) } } return res }