diff --git a/cmd/demoparser/main.go b/cmd/demoparser/main.go index 6854c5a..f0db286 100644 --- a/cmd/demoparser/main.go +++ b/cmd/demoparser/main.go @@ -16,7 +16,7 @@ import ( log "github.com/sirupsen/logrus" ) -const ParserVersion = 11 +const ParserVersion = 12 var configService *config.Service var matchService *match.Service @@ -128,6 +128,8 @@ func worker(matches <-chan *match.Match) { } playerResult.MatchID = m.ID + playerResult.Map = m.Result.Map + playerResult.Time = m.Result.Time playerResult.MatchRounds = byte(len(m.Result.Rounds)) playerResult.ScoreOwnTeam = t.Wins diff --git a/internal/domain/player/entity.go b/internal/domain/player/entity.go index c70c9da..c7a8792 100644 --- a/internal/domain/player/entity.go +++ b/internal/domain/player/entity.go @@ -19,6 +19,8 @@ type Player struct { // PlayerResult holds different performance metrics from one game. type PlayerResult struct { MatchID entity.ID `json:"matchId" bson:"matchId" validation:"required"` + Time time.Time `json:"time" bson:"time" validate:"required"` + Map string `json:"map" bson:"map" validate:"required"` MatchRounds byte `json:"matchRounds" bson:"matchRounds" validation:"required"` ScoreOwnTeam byte `json:"scoreOwnTeam" bson:"scoreOwnTeam"` ScoreEnemyTeam byte `json:"scoreEnemyTeam" bson:"scoreEnemyTeam"`