added spray patterns
This commit is contained in:
@@ -5,8 +5,8 @@ package ent
|
||||
import (
|
||||
"context"
|
||||
"csgowtfd/ent/match"
|
||||
"csgowtfd/ent/matchplayer"
|
||||
"csgowtfd/ent/player"
|
||||
"csgowtfd/ent/stats"
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
@@ -140,17 +140,17 @@ func (mc *MatchCreate) SetID(u uint64) *MatchCreate {
|
||||
return mc
|
||||
}
|
||||
|
||||
// AddStatIDs adds the "stats" edge to the Stats entity by IDs.
|
||||
// AddStatIDs adds the "stats" edge to the MatchPlayer entity by IDs.
|
||||
func (mc *MatchCreate) AddStatIDs(ids ...int) *MatchCreate {
|
||||
mc.mutation.AddStatIDs(ids...)
|
||||
return mc
|
||||
}
|
||||
|
||||
// AddStats adds the "stats" edges to the Stats entity.
|
||||
func (mc *MatchCreate) AddStats(s ...*Stats) *MatchCreate {
|
||||
ids := make([]int, len(s))
|
||||
for i := range s {
|
||||
ids[i] = s[i].ID
|
||||
// AddStats adds the "stats" edges to the MatchPlayer entity.
|
||||
func (mc *MatchCreate) AddStats(m ...*MatchPlayer) *MatchCreate {
|
||||
ids := make([]int, len(m))
|
||||
for i := range m {
|
||||
ids[i] = m[i].ID
|
||||
}
|
||||
return mc.AddStatIDs(ids...)
|
||||
}
|
||||
@@ -426,7 +426,7 @@ func (mc *MatchCreate) createSpec() (*Match, *sqlgraph.CreateSpec) {
|
||||
Target: &sqlgraph.EdgeTarget{
|
||||
IDSpec: &sqlgraph.FieldSpec{
|
||||
Type: field.TypeInt,
|
||||
Column: stats.FieldID,
|
||||
Column: matchplayer.FieldID,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user