updated deps & regen ent

This commit is contained in:
2023-05-16 18:09:10 +02:00
parent e9e3e02a39
commit 3fd0a4204b
53 changed files with 1062 additions and 593 deletions

View File

@@ -4,6 +4,9 @@ package matchplayer
import (
"fmt"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
@@ -209,3 +212,288 @@ func ColorValidator(c Color) error {
return fmt.Errorf("matchplayer: invalid enum value for color field: %q", c)
}
}
// OrderOption defines the ordering options for the MatchPlayer 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()
}
// ByTeamID orders the results by the team_id field.
func ByTeamID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTeamID, opts...).ToFunc()
}
// ByKills orders the results by the kills field.
func ByKills(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldKills, opts...).ToFunc()
}
// ByDeaths orders the results by the deaths field.
func ByDeaths(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeaths, opts...).ToFunc()
}
// ByAssists orders the results by the assists field.
func ByAssists(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAssists, opts...).ToFunc()
}
// ByHeadshot orders the results by the headshot field.
func ByHeadshot(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHeadshot, opts...).ToFunc()
}
// ByMvp orders the results by the mvp field.
func ByMvp(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMvp, opts...).ToFunc()
}
// ByScore orders the results by the score field.
func ByScore(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldScore, opts...).ToFunc()
}
// ByRankNew orders the results by the rank_new field.
func ByRankNew(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRankNew, opts...).ToFunc()
}
// ByRankOld orders the results by the rank_old field.
func ByRankOld(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRankOld, opts...).ToFunc()
}
// ByMk2 orders the results by the mk_2 field.
func ByMk2(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMk2, opts...).ToFunc()
}
// ByMk3 orders the results by the mk_3 field.
func ByMk3(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMk3, opts...).ToFunc()
}
// ByMk4 orders the results by the mk_4 field.
func ByMk4(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMk4, opts...).ToFunc()
}
// ByMk5 orders the results by the mk_5 field.
func ByMk5(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMk5, opts...).ToFunc()
}
// ByDmgEnemy orders the results by the dmg_enemy field.
func ByDmgEnemy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDmgEnemy, opts...).ToFunc()
}
// ByDmgTeam orders the results by the dmg_team field.
func ByDmgTeam(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDmgTeam, opts...).ToFunc()
}
// ByUdHe orders the results by the ud_he field.
func ByUdHe(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUdHe, opts...).ToFunc()
}
// ByUdFlames orders the results by the ud_flames field.
func ByUdFlames(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUdFlames, opts...).ToFunc()
}
// ByUdFlash orders the results by the ud_flash field.
func ByUdFlash(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUdFlash, opts...).ToFunc()
}
// ByUdDecoy orders the results by the ud_decoy field.
func ByUdDecoy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUdDecoy, opts...).ToFunc()
}
// ByUdSmoke orders the results by the ud_smoke field.
func ByUdSmoke(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUdSmoke, opts...).ToFunc()
}
// ByCrosshair orders the results by the crosshair field.
func ByCrosshair(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCrosshair, opts...).ToFunc()
}
// ByColor orders the results by the color field.
func ByColor(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldColor, opts...).ToFunc()
}
// ByKast orders the results by the kast field.
func ByKast(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldKast, opts...).ToFunc()
}
// ByFlashDurationSelf orders the results by the flash_duration_self field.
func ByFlashDurationSelf(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashDurationSelf, opts...).ToFunc()
}
// ByFlashDurationTeam orders the results by the flash_duration_team field.
func ByFlashDurationTeam(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashDurationTeam, opts...).ToFunc()
}
// ByFlashDurationEnemy orders the results by the flash_duration_enemy field.
func ByFlashDurationEnemy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashDurationEnemy, opts...).ToFunc()
}
// ByFlashTotalSelf orders the results by the flash_total_self field.
func ByFlashTotalSelf(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashTotalSelf, opts...).ToFunc()
}
// ByFlashTotalTeam orders the results by the flash_total_team field.
func ByFlashTotalTeam(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashTotalTeam, opts...).ToFunc()
}
// ByFlashTotalEnemy orders the results by the flash_total_enemy field.
func ByFlashTotalEnemy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashTotalEnemy, opts...).ToFunc()
}
// ByMatchStats orders the results by the match_stats field.
func ByMatchStats(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMatchStats, opts...).ToFunc()
}
// ByPlayerStats orders the results by the player_stats field.
func ByPlayerStats(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPlayerStats, opts...).ToFunc()
}
// ByFlashAssists orders the results by the flash_assists field.
func ByFlashAssists(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlashAssists, opts...).ToFunc()
}
// ByAvgPing orders the results by the avg_ping field.
func ByAvgPing(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAvgPing, opts...).ToFunc()
}
// ByMatchesField orders the results by matches field.
func ByMatchesField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newMatchesStep(), sql.OrderByField(field, opts...))
}
}
// ByPlayersField orders the results by players field.
func ByPlayersField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPlayersStep(), sql.OrderByField(field, opts...))
}
}
// ByWeaponStatsCount orders the results by weapon_stats count.
func ByWeaponStatsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newWeaponStatsStep(), opts...)
}
}
// ByWeaponStats orders the results by weapon_stats terms.
func ByWeaponStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newWeaponStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByRoundStatsCount orders the results by round_stats count.
func ByRoundStatsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newRoundStatsStep(), opts...)
}
}
// ByRoundStats orders the results by round_stats terms.
func ByRoundStats(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newRoundStatsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// BySprayCount orders the results by spray count.
func BySprayCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newSprayStep(), opts...)
}
}
// BySpray orders the results by spray terms.
func BySpray(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newSprayStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByMessagesCount orders the results by messages count.
func ByMessagesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newMessagesStep(), opts...)
}
}
// ByMessages orders the results by messages terms.
func ByMessages(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newMessagesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newMatchesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MatchesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, MatchesTable, MatchesColumn),
)
}
func newPlayersStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PlayersInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, PlayersTable, PlayersColumn),
)
}
func newWeaponStatsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(WeaponStatsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, WeaponStatsTable, WeaponStatsColumn),
)
}
func newRoundStatsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(RoundStatsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, RoundStatsTable, RoundStatsColumn),
)
}
func newSprayStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(SprayInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SprayTable, SprayColumn),
)
}
func newMessagesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MessagesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, MessagesTable, MessagesColumn),
)
}

View File

@@ -1772,11 +1772,7 @@ func HasMatches() predicate.MatchPlayer {
// HasMatchesWith applies the HasEdge predicate on the "matches" edge with a given conditions (other predicates).
func HasMatchesWith(preds ...predicate.Match) predicate.MatchPlayer {
return predicate.MatchPlayer(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MatchesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, MatchesTable, MatchesColumn),
)
step := newMatchesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@@ -1799,11 +1795,7 @@ func HasPlayers() predicate.MatchPlayer {
// HasPlayersWith applies the HasEdge predicate on the "players" edge with a given conditions (other predicates).
func HasPlayersWith(preds ...predicate.Player) predicate.MatchPlayer {
return predicate.MatchPlayer(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PlayersInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, PlayersTable, PlayersColumn),
)
step := newPlayersStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@@ -1826,11 +1818,7 @@ func HasWeaponStats() predicate.MatchPlayer {
// HasWeaponStatsWith applies the HasEdge predicate on the "weapon_stats" edge with a given conditions (other predicates).
func HasWeaponStatsWith(preds ...predicate.Weapon) predicate.MatchPlayer {
return predicate.MatchPlayer(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(WeaponStatsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, WeaponStatsTable, WeaponStatsColumn),
)
step := newWeaponStatsStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@@ -1853,11 +1841,7 @@ func HasRoundStats() predicate.MatchPlayer {
// HasRoundStatsWith applies the HasEdge predicate on the "round_stats" edge with a given conditions (other predicates).
func HasRoundStatsWith(preds ...predicate.RoundStats) predicate.MatchPlayer {
return predicate.MatchPlayer(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(RoundStatsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, RoundStatsTable, RoundStatsColumn),
)
step := newRoundStatsStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@@ -1880,11 +1864,7 @@ func HasSpray() predicate.MatchPlayer {
// HasSprayWith applies the HasEdge predicate on the "spray" edge with a given conditions (other predicates).
func HasSprayWith(preds ...predicate.Spray) predicate.MatchPlayer {
return predicate.MatchPlayer(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(SprayInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SprayTable, SprayColumn),
)
step := newSprayStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
@@ -1907,11 +1887,7 @@ func HasMessages() predicate.MatchPlayer {
// 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),
)
step := newMessagesStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)