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),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user