[FEATURE] Detailed stats about player weapon usage and hitgroups (#1)
Reviewed-on: https://git.harting.dev/CSGOWTF/csgowtfd/pulls/1 Co-authored-by: Giovanni Harting <539@idlegandalf.com> Co-committed-by: Giovanni Harting <539@idlegandalf.com>
This commit is contained in:
@@ -162,6 +162,20 @@ func (pc *PlayerCreate) SetNillableAuthCode(s *string) *PlayerCreate {
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetProfileCreated sets the "profile_created" field.
|
||||
func (pc *PlayerCreate) SetProfileCreated(t time.Time) *PlayerCreate {
|
||||
pc.mutation.SetProfileCreated(t)
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetNillableProfileCreated sets the "profile_created" field if the given value is not nil.
|
||||
func (pc *PlayerCreate) SetNillableProfileCreated(t *time.Time) *PlayerCreate {
|
||||
if t != nil {
|
||||
pc.SetProfileCreated(*t)
|
||||
}
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetID sets the "id" field.
|
||||
func (pc *PlayerCreate) SetID(u uint64) *PlayerCreate {
|
||||
pc.mutation.SetID(u)
|
||||
@@ -400,6 +414,14 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
|
||||
})
|
||||
_node.AuthCode = value
|
||||
}
|
||||
if value, ok := pc.mutation.ProfileCreated(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeTime,
|
||||
Value: value,
|
||||
Column: player.FieldProfileCreated,
|
||||
})
|
||||
_node.ProfileCreated = value
|
||||
}
|
||||
if nodes := pc.mutation.StatsIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
|
Reference in New Issue
Block a user