mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 13:46:44 -04:00
Persist schedule blocks to the DB.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user