added chat messages

This commit is contained in:
2022-01-29 19:32:13 +01:00
parent 2e6c94de81
commit b036275665
48 changed files with 4167 additions and 353 deletions

View File

@@ -98,9 +98,11 @@ type MatchPlayerEdges struct {
RoundStats []*RoundStats `json:"round_stats,omitempty"`
// Spray holds the value of the spray edge.
Spray []*Spray `json:"spray,omitempty"`
// Messages holds the value of the messages edge.
Messages []*Messages `json:"messages,omitempty"`
// loadedTypes holds the information for reporting if a
// type was loaded (or requested) in eager-loading or not.
loadedTypes [5]bool
loadedTypes [6]bool
}
// MatchesOrErr returns the Matches value or an error if the edge
@@ -158,6 +160,15 @@ func (e MatchPlayerEdges) SprayOrErr() ([]*Spray, error) {
return nil, &NotLoadedError{edge: "spray"}
}
// MessagesOrErr returns the Messages value or an error if the edge
// was not loaded in eager-loading.
func (e MatchPlayerEdges) MessagesOrErr() ([]*Messages, error) {
if e.loadedTypes[5] {
return e.Messages, nil
}
return nil, &NotLoadedError{edge: "messages"}
}
// scanValues returns the types for scanning values from sql.Rows.
func (*MatchPlayer) scanValues(columns []string) ([]interface{}, error) {
values := make([]interface{}, len(columns))
@@ -412,6 +423,11 @@ func (mp *MatchPlayer) QuerySpray() *SprayQuery {
return (&MatchPlayerClient{config: mp.config}).QuerySpray(mp)
}
// QueryMessages queries the "messages" edge of the MatchPlayer entity.
func (mp *MatchPlayer) QueryMessages() *MessagesQuery {
return (&MatchPlayerClient{config: mp.config}).QueryMessages(mp)
}
// Update returns a builder for updating this MatchPlayer.
// Note that you need to call MatchPlayer.Unwrap() before calling this method if this MatchPlayer
// was returned from a transaction, and the transaction was committed or rolled back.