switched to steam-api for player profile information

This commit is contained in:
2021-10-16 01:33:57 +02:00
parent 3787c59b9e
commit af2523a78a
12 changed files with 388 additions and 116 deletions

View File

@@ -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,