Persist schedule blocks to the DB.

This commit is contained in:
Patrick Fairbank
2018-08-24 20:51:37 -07:00
parent 24693499ec
commit 29033af025
13 changed files with 187 additions and 59 deletions

View File

@@ -35,6 +35,7 @@ type Database struct {
allianceTeamMap *modl.DbMap
lowerThirdMap *modl.DbMap
sponsorSlideMap *modl.DbMap
scheduleBlockMap *modl.DbMap
}
// Opens the SQLite database at the given path, creating it if it doesn't exist, and runs any pending
@@ -120,6 +121,9 @@ func (database *Database) mapTables() {
database.sponsorSlideMap = modl.NewDbMap(database.db, dialect)
database.sponsorSlideMap.AddTableWithName(SponsorSlide{}, "sponsor_slides").SetKeys(true, "Id")
database.scheduleBlockMap = modl.NewDbMap(database.db, dialect)
database.scheduleBlockMap.AddTableWithName(ScheduleBlock{}, "schedule_blocks").SetKeys(true, "Id")
}
func serializeHelper(target *string, source interface{}) error {