added chat messages
This commit is contained in:
12
ent/match.go
12
ent/match.go
@@ -40,6 +40,8 @@ type Match struct {
|
||||
VacPresent bool `json:"vac_present,omitempty"`
|
||||
// GamebanPresent holds the value of the "gameban_present" field.
|
||||
GamebanPresent bool `json:"gameban_present,omitempty"`
|
||||
// DecryptionKey holds the value of the "decryption_key" field.
|
||||
DecryptionKey []byte `json:"decryption_key,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the MatchQuery when eager-loading is set.
|
||||
Edges MatchEdges `json:"edges"`
|
||||
@@ -79,6 +81,8 @@ func (*Match) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
for i := range columns {
|
||||
switch columns[i] {
|
||||
case match.FieldDecryptionKey:
|
||||
values[i] = new([]byte)
|
||||
case match.FieldDemoParsed, match.FieldVacPresent, match.FieldGamebanPresent:
|
||||
values[i] = new(sql.NullBool)
|
||||
case match.FieldID, match.FieldScoreTeamA, match.FieldScoreTeamB, match.FieldDuration, match.FieldMatchResult, match.FieldMaxRounds:
|
||||
@@ -180,6 +184,12 @@ func (m *Match) assignValues(columns []string, values []interface{}) error {
|
||||
} else if value.Valid {
|
||||
m.GamebanPresent = value.Bool
|
||||
}
|
||||
case match.FieldDecryptionKey:
|
||||
if value, ok := values[i].(*[]byte); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field decryption_key", values[i])
|
||||
} else if value != nil {
|
||||
m.DecryptionKey = *value
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
@@ -242,6 +252,8 @@ func (m *Match) String() string {
|
||||
builder.WriteString(fmt.Sprintf("%v", m.VacPresent))
|
||||
builder.WriteString(", gameban_present=")
|
||||
builder.WriteString(fmt.Sprintf("%v", m.GamebanPresent))
|
||||
builder.WriteString(", decryption_key=")
|
||||
builder.WriteString(fmt.Sprintf("%v", m.DecryptionKey))
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user