Changed the structure of the whole application, should be no changes to functionality.

This commit is contained in:
2021-12-05 11:18:48 +01:00
parent 0a73134381
commit e1de6f0f76
28 changed files with 935 additions and 1105 deletions

41
pkg/models/models.go Normal file
View File

@@ -0,0 +1,41 @@
package models
import "time"
type Played struct {
Song int
}
type VersionData struct {
Version string `json:"version"`
Changelog string `json:"changelog"`
History []VersionData `json:"history"`
}
type SongInfo struct {
Game string `json:"Game"`
GamePlayed int `json:"GamePlayed"`
Song string `json:"Song"`
SongPlayed int `json:"SongPlayed"`
CurrentlyPlaying bool `json:"CurrentlyPlaying"`
SongNo int `json:"SongNo"`
}
type GameData struct {
Id int
GameName string
Added time.Time
Deleted time.Time
LastChanged time.Time
Path string
TimesPlayed int
LastPlayed time.Time
NumberOfSongs int32
}
type SongData struct {
GameId int
SongName string
Path string
TimesPlayed int
}