updated deps & regen ent
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
package spray
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the spray type in the database.
|
||||
Label = "spray"
|
||||
@@ -51,3 +56,30 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// OrderOption defines the ordering options for the Spray 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()
|
||||
}
|
||||
|
||||
// ByWeapon orders the results by the weapon field.
|
||||
func ByWeapon(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldWeapon, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchPlayersField orders the results by match_players field.
|
||||
func ByMatchPlayersField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newMatchPlayersStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
func newMatchPlayersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MatchPlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, MatchPlayersTable, MatchPlayersColumn),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user