updated deps & regen ent
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
package messages
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the messages type in the database.
|
||||
Label = "messages"
|
||||
@@ -54,3 +59,40 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Messages queries.
|
||||
type OrderOption func(*sql.Selector)
|
||||
|
||||
// ByID orders the results by the id field.
|
||||
func ByID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMessage orders the results by the message field.
|
||||
func ByMessage(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMessage, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAllChat orders the results by the all_chat field.
|
||||
func ByAllChat(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAllChat, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTick orders the results by the tick field.
|
||||
func ByTick(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTick, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchPlayerField orders the results by match_player field.
|
||||
func ByMatchPlayerField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchPlayerStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newMatchPlayerStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
}
|
||||
|
@@ -197,11 +197,7 @@ func HasMatchPlayer() predicate.Messages {
|
||||
// HasMatchPlayerWith applies the HasEdge predicate on the "match_player" edge with a given conditions (other predicates).
|
||||
func HasMatchPlayerWith(preds ...predicate.MatchPlayer) predicate.Messages {
|
||||
return predicate.Messages(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayerInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayerTable, MatchPlayerColumn),
|
||||
)
|
||||
step := newMatchPlayerStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
Reference in New Issue
Block a user