added spray patterns

This commit is contained in:
2021-10-31 08:40:02 +01:00
parent 268793f0e5
commit 978232dd0a
66 changed files with 16805 additions and 11903 deletions

View File

@@ -4,9 +4,9 @@ package ent
import (
"context"
"csgowtfd/ent/matchplayer"
"csgowtfd/ent/predicate"
"csgowtfd/ent/roundstats"
"csgowtfd/ent/stats"
"fmt"
"entgo.io/ent/dialect/sql"
@@ -79,23 +79,23 @@ func (rsu *RoundStatsUpdate) AddSpent(u uint) *RoundStatsUpdate {
return rsu
}
// SetStatID sets the "stat" edge to the Stats entity by ID.
func (rsu *RoundStatsUpdate) SetStatID(id int) *RoundStatsUpdate {
rsu.mutation.SetStatID(id)
// SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.
func (rsu *RoundStatsUpdate) SetMatchPlayerID(id int) *RoundStatsUpdate {
rsu.mutation.SetMatchPlayerID(id)
return rsu
}
// SetNillableStatID sets the "stat" edge to the Stats entity by ID if the given value is not nil.
func (rsu *RoundStatsUpdate) SetNillableStatID(id *int) *RoundStatsUpdate {
// SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.
func (rsu *RoundStatsUpdate) SetNillableMatchPlayerID(id *int) *RoundStatsUpdate {
if id != nil {
rsu = rsu.SetStatID(*id)
rsu = rsu.SetMatchPlayerID(*id)
}
return rsu
}
// SetStat sets the "stat" edge to the Stats entity.
func (rsu *RoundStatsUpdate) SetStat(s *Stats) *RoundStatsUpdate {
return rsu.SetStatID(s.ID)
// SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.
func (rsu *RoundStatsUpdate) SetMatchPlayer(m *MatchPlayer) *RoundStatsUpdate {
return rsu.SetMatchPlayerID(m.ID)
}
// Mutation returns the RoundStatsMutation object of the builder.
@@ -103,9 +103,9 @@ func (rsu *RoundStatsUpdate) Mutation() *RoundStatsMutation {
return rsu.mutation
}
// ClearStat clears the "stat" edge to the Stats entity.
func (rsu *RoundStatsUpdate) ClearStat() *RoundStatsUpdate {
rsu.mutation.ClearStat()
// ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.
func (rsu *RoundStatsUpdate) ClearMatchPlayer() *RoundStatsUpdate {
rsu.mutation.ClearMatchPlayer()
return rsu
}
@@ -237,33 +237,33 @@ func (rsu *RoundStatsUpdate) sqlSave(ctx context.Context) (n int, err error) {
Column: roundstats.FieldSpent,
})
}
if rsu.mutation.StatCleared() {
if rsu.mutation.MatchPlayerCleared() {
edge := &sqlgraph.EdgeSpec{
Rel: sqlgraph.M2O,
Inverse: true,
Table: roundstats.StatTable,
Columns: []string{roundstats.StatColumn},
Table: roundstats.MatchPlayerTable,
Columns: []string{roundstats.MatchPlayerColumn},
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Column: stats.FieldID,
Column: matchplayer.FieldID,
},
},
}
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
}
if nodes := rsu.mutation.StatIDs(); len(nodes) > 0 {
if nodes := rsu.mutation.MatchPlayerIDs(); len(nodes) > 0 {
edge := &sqlgraph.EdgeSpec{
Rel: sqlgraph.M2O,
Inverse: true,
Table: roundstats.StatTable,
Columns: []string{roundstats.StatColumn},
Table: roundstats.MatchPlayerTable,
Columns: []string{roundstats.MatchPlayerColumn},
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Column: stats.FieldID,
Column: matchplayer.FieldID,
},
},
}
@@ -343,23 +343,23 @@ func (rsuo *RoundStatsUpdateOne) AddSpent(u uint) *RoundStatsUpdateOne {
return rsuo
}
// SetStatID sets the "stat" edge to the Stats entity by ID.
func (rsuo *RoundStatsUpdateOne) SetStatID(id int) *RoundStatsUpdateOne {
rsuo.mutation.SetStatID(id)
// SetMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID.
func (rsuo *RoundStatsUpdateOne) SetMatchPlayerID(id int) *RoundStatsUpdateOne {
rsuo.mutation.SetMatchPlayerID(id)
return rsuo
}
// SetNillableStatID sets the "stat" edge to the Stats entity by ID if the given value is not nil.
func (rsuo *RoundStatsUpdateOne) SetNillableStatID(id *int) *RoundStatsUpdateOne {
// SetNillableMatchPlayerID sets the "match_player" edge to the MatchPlayer entity by ID if the given value is not nil.
func (rsuo *RoundStatsUpdateOne) SetNillableMatchPlayerID(id *int) *RoundStatsUpdateOne {
if id != nil {
rsuo = rsuo.SetStatID(*id)
rsuo = rsuo.SetMatchPlayerID(*id)
}
return rsuo
}
// SetStat sets the "stat" edge to the Stats entity.
func (rsuo *RoundStatsUpdateOne) SetStat(s *Stats) *RoundStatsUpdateOne {
return rsuo.SetStatID(s.ID)
// SetMatchPlayer sets the "match_player" edge to the MatchPlayer entity.
func (rsuo *RoundStatsUpdateOne) SetMatchPlayer(m *MatchPlayer) *RoundStatsUpdateOne {
return rsuo.SetMatchPlayerID(m.ID)
}
// Mutation returns the RoundStatsMutation object of the builder.
@@ -367,9 +367,9 @@ func (rsuo *RoundStatsUpdateOne) Mutation() *RoundStatsMutation {
return rsuo.mutation
}
// ClearStat clears the "stat" edge to the Stats entity.
func (rsuo *RoundStatsUpdateOne) ClearStat() *RoundStatsUpdateOne {
rsuo.mutation.ClearStat()
// ClearMatchPlayer clears the "match_player" edge to the MatchPlayer entity.
func (rsuo *RoundStatsUpdateOne) ClearMatchPlayer() *RoundStatsUpdateOne {
rsuo.mutation.ClearMatchPlayer()
return rsuo
}
@@ -525,33 +525,33 @@ func (rsuo *RoundStatsUpdateOne) sqlSave(ctx context.Context) (_node *RoundStats
Column: roundstats.FieldSpent,
})
}
if rsuo.mutation.StatCleared() {
if rsuo.mutation.MatchPlayerCleared() {
edge := &sqlgraph.EdgeSpec{
Rel: sqlgraph.M2O,
Inverse: true,
Table: roundstats.StatTable,
Columns: []string{roundstats.StatColumn},
Table: roundstats.MatchPlayerTable,
Columns: []string{roundstats.MatchPlayerColumn},
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Column: stats.FieldID,
Column: matchplayer.FieldID,
},
},
}
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
}
if nodes := rsuo.mutation.StatIDs(); len(nodes) > 0 {
if nodes := rsuo.mutation.MatchPlayerIDs(); len(nodes) > 0 {
edge := &sqlgraph.EdgeSpec{
Rel: sqlgraph.M2O,
Inverse: true,
Table: roundstats.StatTable,
Columns: []string{roundstats.StatColumn},
Table: roundstats.MatchPlayerTable,
Columns: []string{roundstats.MatchPlayerColumn},
Bidi: false,
Target: &sqlgraph.EdgeTarget{
IDSpec: &sqlgraph.FieldSpec{
Type: field.TypeInt,
Column: stats.FieldID,
Column: matchplayer.FieldID,
},
},
}