fill history if an older match appeared
This commit is contained in:
@@ -176,6 +176,20 @@ func (pc *PlayerCreate) SetNillableProfileCreated(t *time.Time) *PlayerCreate {
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetOldestSharecodeSeen sets the "oldest_sharecode_seen" field.
|
||||
func (pc *PlayerCreate) SetOldestSharecodeSeen(s string) *PlayerCreate {
|
||||
pc.mutation.SetOldestSharecodeSeen(s)
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetNillableOldestSharecodeSeen sets the "oldest_sharecode_seen" field if the given value is not nil.
|
||||
func (pc *PlayerCreate) SetNillableOldestSharecodeSeen(s *string) *PlayerCreate {
|
||||
if s != nil {
|
||||
pc.SetOldestSharecodeSeen(*s)
|
||||
}
|
||||
return pc
|
||||
}
|
||||
|
||||
// SetID sets the "id" field.
|
||||
func (pc *PlayerCreate) SetID(u uint64) *PlayerCreate {
|
||||
pc.mutation.SetID(u)
|
||||
@@ -422,6 +436,14 @@ func (pc *PlayerCreate) createSpec() (*Player, *sqlgraph.CreateSpec) {
|
||||
})
|
||||
_node.ProfileCreated = value
|
||||
}
|
||||
if value, ok := pc.mutation.OldestSharecodeSeen(); ok {
|
||||
_spec.Fields = append(_spec.Fields, &sqlgraph.FieldSpec{
|
||||
Type: field.TypeString,
|
||||
Value: value,
|
||||
Column: player.FieldOldestSharecodeSeen,
|
||||
})
|
||||
_node.OldestSharecodeSeen = value
|
||||
}
|
||||
if nodes := pc.mutation.StatsIDs(); len(nodes) > 0 {
|
||||
edge := &sqlgraph.EdgeSpec{
|
||||
Rel: sqlgraph.O2M,
|
||||
|
Reference in New Issue
Block a user