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

@@ -234,13 +234,13 @@ func (su *StatsUpdate) ClearExtended() *StatsUpdate {
}
// SetMatchesID sets the "matches" edge to the Match entity by ID.
func (su *StatsUpdate) SetMatchesID(id int) *StatsUpdate {
func (su *StatsUpdate) SetMatchesID(id uint64) *StatsUpdate {
su.mutation.SetMatchesID(id)
return su
}
// SetNillableMatchesID sets the "matches" edge to the Match entity by ID if the given value is not nil.
func (su *StatsUpdate) SetNillableMatchesID(id *int) *StatsUpdate {
func (su *StatsUpdate) SetNillableMatchesID(id *uint64) *StatsUpdate {
if id != nil {
su = su.SetMatchesID(*id)
}
@@ -253,13 +253,13 @@ func (su *StatsUpdate) SetMatches(m *Match) *StatsUpdate {
}
// SetPlayersID sets the "players" edge to the Player entity by ID.
func (su *StatsUpdate) SetPlayersID(id int) *StatsUpdate {
func (su *StatsUpdate) SetPlayersID(id uint64) *StatsUpdate {
su.mutation.SetPlayersID(id)
return su
}
// SetNillablePlayersID sets the "players" edge to the Player entity by ID if the given value is not nil.
func (su *StatsUpdate) SetNillablePlayersID(id *int) *StatsUpdate {
func (su *StatsUpdate) SetNillablePlayersID(id *uint64) *StatsUpdate {
if id != nil {
su = su.SetPlayersID(*id)
}
@@ -480,7 +480,7 @@ func (su *StatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -496,7 +496,7 @@ func (su *StatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -515,7 +515,7 @@ func (su *StatsUpdate) 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,
},
},
@@ -531,7 +531,7 @@ func (su *StatsUpdate) 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,
},
},
@@ -766,13 +766,13 @@ func (suo *StatsUpdateOne) ClearExtended() *StatsUpdateOne {
}
// SetMatchesID sets the "matches" edge to the Match entity by ID.
func (suo *StatsUpdateOne) SetMatchesID(id int) *StatsUpdateOne {
func (suo *StatsUpdateOne) SetMatchesID(id uint64) *StatsUpdateOne {
suo.mutation.SetMatchesID(id)
return suo
}
// SetNillableMatchesID sets the "matches" edge to the Match entity by ID if the given value is not nil.
func (suo *StatsUpdateOne) SetNillableMatchesID(id *int) *StatsUpdateOne {
func (suo *StatsUpdateOne) SetNillableMatchesID(id *uint64) *StatsUpdateOne {
if id != nil {
suo = suo.SetMatchesID(*id)
}
@@ -785,13 +785,13 @@ func (suo *StatsUpdateOne) SetMatches(m *Match) *StatsUpdateOne {
}
// SetPlayersID sets the "players" edge to the Player entity by ID.
func (suo *StatsUpdateOne) SetPlayersID(id int) *StatsUpdateOne {
func (suo *StatsUpdateOne) SetPlayersID(id uint64) *StatsUpdateOne {
suo.mutation.SetPlayersID(id)
return suo
}
// SetNillablePlayersID sets the "players" edge to the Player entity by ID if the given value is not nil.
func (suo *StatsUpdateOne) SetNillablePlayersID(id *int) *StatsUpdateOne {
func (suo *StatsUpdateOne) SetNillablePlayersID(id *uint64) *StatsUpdateOne {
if id != nil {
suo = suo.SetPlayersID(*id)
}
@@ -1036,7 +1036,7 @@ func (suo *StatsUpdateOne) sqlSave(ctx context.Context) (_node *Stats, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -1052,7 +1052,7 @@ func (suo *StatsUpdateOne) sqlSave(ctx context.Context) (_node *Stats, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: match.FieldID,
},
},
@@ -1071,7 +1071,7 @@ func (suo *StatsUpdateOne) sqlSave(ctx context.Context) (_node *Stats, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},
@@ -1087,7 +1087,7 @@ func (suo *StatsUpdateOne) sqlSave(ctx context.Context) (_node *Stats, err error
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Type: field.TypeUint64,
Column: player.FieldID,
},
},