added tick to messages
This commit is contained in:
@@ -20,6 +20,8 @@ type Messages struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
// AllChat holds the value of the "all_chat" field.
|
||||
AllChat bool `json:"all_chat,omitempty"`
|
||||
// Tick holds the value of the "tick" field.
|
||||
Tick int `json:"tick,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the MessagesQuery when eager-loading is set.
|
||||
Edges MessagesEdges `json:"edges"`
|
||||
@@ -56,7 +58,7 @@ func (*Messages) scanValues(columns []string) ([]interface{}, error) {
|
||||
switch columns[i] {
|
||||
case messages.FieldAllChat:
|
||||
values[i] = new(sql.NullBool)
|
||||
case messages.FieldID:
|
||||
case messages.FieldID, messages.FieldTick:
|
||||
values[i] = new(sql.NullInt64)
|
||||
case messages.FieldMessage:
|
||||
values[i] = new(sql.NullString)
|
||||
@@ -95,6 +97,12 @@ func (m *Messages) assignValues(columns []string, values []interface{}) error {
|
||||
} else if value.Valid {
|
||||
m.AllChat = value.Bool
|
||||
}
|
||||
case messages.FieldTick:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field tick", values[i])
|
||||
} else if value.Valid {
|
||||
m.Tick = int(value.Int64)
|
||||
}
|
||||
case messages.ForeignKeys[0]:
|
||||
if value, ok := values[i].(*sql.NullInt64); !ok {
|
||||
return fmt.Errorf("unexpected type %T for edge-field match_player_messages", value)
|
||||
@@ -139,6 +147,8 @@ func (m *Messages) String() string {
|
||||
builder.WriteString(m.Message)
|
||||
builder.WriteString(", all_chat=")
|
||||
builder.WriteString(fmt.Sprintf("%v", m.AllChat))
|
||||
builder.WriteString(", tick=")
|
||||
builder.WriteString(fmt.Sprintf("%v", m.Tick))
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
Reference in New Issue
Block a user