updated deps & regen ent
This commit is contained in:
@@ -2,6 +2,11 @@
|
||||
|
||||
package match
|
||||
|
||||
import (
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the match type in the database.
|
||||
Label = "match"
|
||||
@@ -98,3 +103,118 @@ var (
|
||||
// DefaultGamebanPresent holds the default value on creation for the "gameban_present" field.
|
||||
DefaultGamebanPresent bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the Match 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()
|
||||
}
|
||||
|
||||
// ByShareCode orders the results by the share_code field.
|
||||
func ByShareCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShareCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMap orders the results by the map field.
|
||||
func ByMap(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMap, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDate orders the results by the date field.
|
||||
func ByDate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScoreTeamA orders the results by the score_team_a field.
|
||||
func ByScoreTeamA(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScoreTeamA, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByScoreTeamB orders the results by the score_team_b field.
|
||||
func ByScoreTeamB(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldScoreTeamB, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByReplayURL orders the results by the replay_url field.
|
||||
func ByReplayURL(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldReplayURL, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDuration orders the results by the duration field.
|
||||
func ByDuration(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDuration, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMatchResult orders the results by the match_result field.
|
||||
func ByMatchResult(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMatchResult, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaxRounds orders the results by the max_rounds field.
|
||||
func ByMaxRounds(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaxRounds, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDemoParsed orders the results by the demo_parsed field.
|
||||
func ByDemoParsed(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDemoParsed, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVacPresent orders the results by the vac_present field.
|
||||
func ByVacPresent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVacPresent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGamebanPresent orders the results by the gameban_present field.
|
||||
func ByGamebanPresent(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGamebanPresent, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTickRate orders the results by the tick_rate field.
|
||||
func ByTickRate(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTickRate, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByStatsCount orders the results by stats count.
|
||||
func ByStatsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newStatsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByStats orders the results by stats terms.
|
||||
func ByStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByPlayersCount orders the results by players count.
|
||||
func ByPlayersCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newPlayersStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByPlayers orders the results by players terms.
|
||||
func ByPlayers(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newPlayersStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newStatsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(StatsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, StatsTable, StatsColumn),
|
||||
)
|
||||
}
|
||||
func newPlayersStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(PlayersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2M, true, PlayersTable, PlayersPrimaryKey...),
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user