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

@@ -222,14 +222,14 @@ func (mu *MatchUpdate) AddStats(s ...*Stats) *MatchUpdate {
}
// AddPlayerIDs adds the "players" edge to the Player entity by IDs.
func (mu *MatchUpdate) AddPlayerIDs(ids ...int) *MatchUpdate {
func (mu *MatchUpdate) AddPlayerIDs(ids ...uint64) *MatchUpdate {
mu.mutation.AddPlayerIDs(ids...)
return mu
}
// AddPlayers adds the "players" edges to the Player entity.
func (mu *MatchUpdate) AddPlayers(p ...*Player) *MatchUpdate {
ids := make([]int, len(p))
ids := make([]uint64, len(p))
for i := range p {
ids[i] = p[i].ID
}
@@ -269,14 +269,14 @@ func (mu *MatchUpdate) ClearPlayers() *MatchUpdate {
}
// RemovePlayerIDs removes the "players" edge to Player entities by IDs.
func (mu *MatchUpdate) RemovePlayerIDs(ids ...int) *MatchUpdate {
func (mu *MatchUpdate) RemovePlayerIDs(ids ...uint64) *MatchUpdate {
mu.mutation.RemovePlayerIDs(ids...)
return mu
}
// RemovePlayers removes "players" edges to Player entities.
func (mu *MatchUpdate) RemovePlayers(p ...*Player) *MatchUpdate {
ids := make([]int, len(p))
ids := make([]uint64, len(p))
for i := range p {
ids[i] = p[i].ID
}
@@ -343,7 +343,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
Table: match.Table,
Columns: match.Columns,
ID: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -555,7 +555,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -571,7 +571,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -590,7 +590,7 @@ func (mu *MatchUpdate) sqlSave(ctx context.Context) (n int, err error) {
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -812,14 +812,14 @@ func (muo *MatchUpdateOne) AddStats(s ...*Stats) *MatchUpdateOne {
}
// AddPlayerIDs adds the "players" edge to the Player entity by IDs.
func (muo *MatchUpdateOne) AddPlayerIDs(ids ...int) *MatchUpdateOne {
func (muo *MatchUpdateOne) AddPlayerIDs(ids ...uint64) *MatchUpdateOne {
muo.mutation.AddPlayerIDs(ids...)
return muo
}
// AddPlayers adds the "players" edges to the Player entity.
func (muo *MatchUpdateOne) AddPlayers(p ...*Player) *MatchUpdateOne {
ids := make([]int, len(p))
ids := make([]uint64, len(p))
for i := range p {
ids[i] = p[i].ID
}
@@ -859,14 +859,14 @@ func (muo *MatchUpdateOne) ClearPlayers() *MatchUpdateOne {
}
// RemovePlayerIDs removes the "players" edge to Player entities by IDs.
func (muo *MatchUpdateOne) RemovePlayerIDs(ids ...int) *MatchUpdateOne {
func (muo *MatchUpdateOne) RemovePlayerIDs(ids ...uint64) *MatchUpdateOne {
muo.mutation.RemovePlayerIDs(ids...)
return muo
}
// RemovePlayers removes "players" edges to Player entities.
func (muo *MatchUpdateOne) RemovePlayers(p ...*Player) *MatchUpdateOne {
ids := make([]int, len(p))
ids := make([]uint64, len(p))
for i := range p {
ids[i] = p[i].ID
}
@@ -940,7 +940,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
Table: match.Table,
Columns: match.Columns,
ID: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -1169,7 +1169,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -1185,7 +1185,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -1204,7 +1204,7 @@ func (muo *MatchUpdateOne) sqlSave(ctx context.Context) (_node *Match, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},