package setup

import (
	"gitlab.thpeetz.de/kontor/kontor-go/pkg/dao"
	"gitlab.thpeetz.de/kontor/kontor-go/pkg/tysc"
	"log"
)

// CheckTradeYourSportsCardsData checks if the TYSC releated data is available.
func CheckTradeYourSportsCardsData() {
	log.Printf("Check data for TradeYourSportsCards module")
	var sport = tysc.SportDAO{Db: dao.KontorDb}
	sport.Upsert(tysc.Sport{Name: "Football"})
	football, _ := sport.FindByName("Football")
	sport.Upsert(tysc.Sport{Name: "Baseball"})
	sport.Upsert(tysc.Sport{Name: "Basketball"})
	sport.Upsert(tysc.Sport{Name: "Hockey"})
	var position = tysc.PositionDAO{Db: dao.KontorDb}
	position.Upsert(tysc.Position{Name: "WR", Description: "Wide Receiver", Sport: football.ID})
}
