deleted round from db/response

This commit is contained in:
2021-10-09 00:57:05 +02:00
parent 1355dfad8d
commit 15b273f052
11 changed files with 4 additions and 264 deletions

View File

@@ -35,8 +35,6 @@ type Match struct {
MatchResult int `json:"match_result,omitempty"`
// MaxRounds holds the value of the "max_rounds" field.
MaxRounds int `json:"max_rounds,omitempty"`
// Rounds holds the value of the "rounds" field.
Rounds int `json:"rounds,omitempty"`
// DemoExpired holds the value of the "demo_expired" field.
DemoExpired bool `json:"demo_expired,omitempty"`
// DemoParsed holds the value of the "demo_parsed" field.
@@ -92,7 +90,7 @@ func (*Match) scanValues(columns []string) ([]interface{}, error) {
values[i] = new([]byte)
case match.FieldDemoExpired, match.FieldDemoParsed:
values[i] = new(sql.NullBool)
case match.FieldID, match.FieldScoreTeamA, match.FieldScoreTeamB, match.FieldDuration, match.FieldMatchResult, match.FieldMaxRounds, match.FieldRounds:
case match.FieldID, match.FieldScoreTeamA, match.FieldScoreTeamB, match.FieldDuration, match.FieldMatchResult, match.FieldMaxRounds:
values[i] = new(sql.NullInt64)
case match.FieldShareCode, match.FieldMap, match.FieldReplayURL:
values[i] = new(sql.NullString)
@@ -173,12 +171,6 @@ func (m *Match) assignValues(columns []string, values []interface{}) error {
} else if value.Valid {
m.MaxRounds = int(value.Int64)
}
case match.FieldRounds:
if value, ok := values[i].(*sql.NullInt64); !ok {
return fmt.Errorf("unexpected type %T for field rounds", values[i])
} else if value.Valid {
m.Rounds = int(value.Int64)
}
case match.FieldDemoExpired:
if value, ok := values[i].(*sql.NullBool); !ok {
return fmt.Errorf("unexpected type %T for field demo_expired", values[i])
@@ -255,8 +247,6 @@ func (m *Match) String() string {
builder.WriteString(fmt.Sprintf("%v", m.MatchResult))
builder.WriteString(", max_rounds=")
builder.WriteString(fmt.Sprintf("%v", m.MaxRounds))
builder.WriteString(", rounds=")
builder.WriteString(fmt.Sprintf("%v", m.Rounds))
builder.WriteString(", demo_expired=")
builder.WriteString(fmt.Sprintf("%v", m.DemoExpired))
builder.WriteString(", demo_parsed=")