deleted round from db/response
This commit is contained in:
12
ent/match.go
12
ent/match.go
@@ -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=")
|
||||
|
Reference in New Issue
Block a user