added chat messages
This commit is contained in:
@@ -3182,6 +3182,34 @@ func HasSprayWith(preds ...predicate.Spray) predicate.MatchPlayer {
|
||||
})
|
||||
}
|
||||
|
||||
// HasMessages applies the HasEdge predicate on the "messages" edge.
|
||||
func HasMessages() predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MessagesTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MessagesTable, MessagesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasMessagesWith applies the HasEdge predicate on the "messages" edge with a given conditions (other predicates).
|
||||
func HasMessagesWith(preds ...predicate.Messages) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MessagesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MessagesTable, MessagesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.MatchPlayer) predicate.MatchPlayer {
|
||||
return predicate.MatchPlayer(func(s *sql.Selector) {
|
||||
|
Reference in New Issue
Block a user