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

@@ -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),
)
}