fixed match win/loss/ties

This commit is contained in:
2021-10-08 17:15:06 +02:00
parent 1fda101a35
commit 1816c5a2b5
28 changed files with 363 additions and 654 deletions

View File

@@ -10,8 +10,7 @@ import (
var (
// MatchesColumns holds the columns for the "matches" table.
MatchesColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "match_id", Type: field.TypeUint64, Unique: true},
{Name: "id", Type: field.TypeUint64, Increment: true},
{Name: "share_code", Type: field.TypeString},
{Name: "map", Type: field.TypeString, Nullable: true},
{Name: "date", Type: field.TypeTime},
@@ -33,8 +32,7 @@ var (
}
// PlayersColumns holds the columns for the "players" table.
PlayersColumns = []*schema.Column{
{Name: "id", Type: field.TypeInt, Increment: true},
{Name: "steamid", Type: field.TypeUint64, Unique: true},
{Name: "id", Type: field.TypeUint64, Increment: true},
{Name: "name", Type: field.TypeString, Nullable: true},
{Name: "avatar_url", Type: field.TypeString, Nullable: true},
{Name: "vanity_url", Type: field.TypeString, Nullable: true},
@@ -63,8 +61,8 @@ var (
{Name: "mvp", Type: field.TypeInt},
{Name: "score", Type: field.TypeInt},
{Name: "extended", Type: field.TypeJSON, Nullable: true},
{Name: "match_stats", Type: field.TypeInt, Nullable: true},
{Name: "player_stats", Type: field.TypeInt, Nullable: true},
{Name: "match_stats", Type: field.TypeUint64, Nullable: true},
{Name: "player_stats", Type: field.TypeUint64, Nullable: true},
}
// StatsTable holds the schema information for the "stats" table.
StatsTable = &schema.Table{
@@ -88,8 +86,8 @@ var (
}
// PlayerMatchesColumns holds the columns for the "player_matches" table.
PlayerMatchesColumns = []*schema.Column{
{Name: "player_id", Type: field.TypeInt},
{Name: "match_id", Type: field.TypeInt},
{Name: "player_id", Type: field.TypeUint64},
{Name: "match_id", Type: field.TypeUint64},
}
// PlayerMatchesTable holds the schema information for the "player_matches" table.
PlayerMatchesTable = &schema.Table{