name change
This commit is contained in:
288
ent/user/user.go
288
ent/user/user.go
@ -4,6 +4,9 @@ package user
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -250,3 +253,288 @@ var (
|
||||
// DefaultGameAccount holds the default value on creation for the "game_account" field.
|
||||
DefaultGameAccount bool
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the User 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()
|
||||
}
|
||||
|
||||
// ByUsername orders the results by the username field.
|
||||
func ByUsername(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUsername, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDid orders the results by the did field.
|
||||
func ByDid(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDid, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMember orders the results by the member field.
|
||||
func ByMember(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMember, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBook orders the results by the book field.
|
||||
func ByBook(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBook, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManga orders the results by the manga field.
|
||||
func ByManga(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManga, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBadge orders the results by the badge field.
|
||||
func ByBadge(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBadge, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBsky orders the results by the bsky field.
|
||||
func ByBsky(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBsky, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMastodon orders the results by the mastodon field.
|
||||
func ByMastodon(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMastodon, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDelete orders the results by the delete field.
|
||||
func ByDelete(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDelete, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByHandle orders the results by the handle field.
|
||||
func ByHandle(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldHandle, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByToken orders the results by the token field.
|
||||
func ByToken(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldToken, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPassword orders the results by the password field.
|
||||
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPassword, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUpdatedAt orders the results by the updated_at field.
|
||||
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRaidAt orders the results by the raid_at field.
|
||||
func ByRaidAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRaidAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByServerAt orders the results by the server_at field.
|
||||
func ByServerAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldServerAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByEggAt orders the results by the egg_at field.
|
||||
func ByEggAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldEggAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLuck orders the results by the luck field.
|
||||
func ByLuck(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLuck, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLuckAt orders the results by the luck_at field.
|
||||
func ByLuckAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLuckAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLike orders the results by the like field.
|
||||
func ByLike(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLike, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLikeRank orders the results by the like_rank field.
|
||||
func ByLikeRank(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLikeRank, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLikeAt orders the results by the like_at field.
|
||||
func ByLikeAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLikeAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFav orders the results by the fav field.
|
||||
func ByFav(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFav, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTen orders the results by the ten field.
|
||||
func ByTen(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTen, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenSu orders the results by the ten_su field.
|
||||
func ByTenSu(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenSu, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenKai orders the results by the ten_kai field.
|
||||
func ByTenKai(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenKai, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByAiten orders the results by the aiten field.
|
||||
func ByAiten(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldAiten, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenCard orders the results by the ten_card field.
|
||||
func ByTenCard(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenCard, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenDelete orders the results by the ten_delete field.
|
||||
func ByTenDelete(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenDelete, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenPost orders the results by the ten_post field.
|
||||
func ByTenPost(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenPost, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenGet orders the results by the ten_get field.
|
||||
func ByTenGet(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenGet, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTenAt orders the results by the ten_at field.
|
||||
func ByTenAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTenAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByNext orders the results by the next field.
|
||||
func ByNext(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldNext, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRoom orders the results by the room field.
|
||||
func ByRoom(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRoom, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModel orders the results by the model field.
|
||||
func ByModel(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModel, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelAt orders the results by the model_at field.
|
||||
func ByModelAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelAttack orders the results by the model_attack field.
|
||||
func ByModelAttack(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelAttack, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelLimit orders the results by the model_limit field.
|
||||
func ByModelLimit(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelLimit, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelSkill orders the results by the model_skill field.
|
||||
func ByModelSkill(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelSkill, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelMode orders the results by the model_mode field.
|
||||
func ByModelMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelCritical orders the results by the model_critical field.
|
||||
func ByModelCritical(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelCritical, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByModelCriticalD orders the results by the model_critical_d field.
|
||||
func ByModelCriticalD(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldModelCriticalD, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGame orders the results by the game field.
|
||||
func ByGame(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGame, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameTest orders the results by the game_test field.
|
||||
func ByGameTest(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameTest, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameEnd orders the results by the game_end field.
|
||||
func ByGameEnd(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameEnd, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameAccount orders the results by the game_account field.
|
||||
func ByGameAccount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameAccount, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByGameLv orders the results by the game_lv field.
|
||||
func ByGameLv(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldGameLv, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCardCount orders the results by card count.
|
||||
func ByCardCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newCardStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByCard orders the results by card terms.
|
||||
func ByCard(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newCardStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUeCount orders the results by ue count.
|
||||
func ByUeCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newUeStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByUe orders the results by ue terms.
|
||||
func ByUe(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUeStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newCardStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(CardInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, CardTable, CardColumn),
|
||||
)
|
||||
}
|
||||
func newUeStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UeInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, UeTable, UeColumn),
|
||||
)
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"t/ent/predicate"
|
||||
"api/ent/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
@ -2439,11 +2439,7 @@ func HasCard() predicate.User {
|
||||
// HasCardWith applies the HasEdge predicate on the "card" edge with a given conditions (other predicates).
|
||||
func HasCardWith(preds ...predicate.Card) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(CardInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, CardTable, CardColumn),
|
||||
)
|
||||
step := newCardStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
@ -2466,11 +2462,7 @@ func HasUe() predicate.User {
|
||||
// HasUeWith applies the HasEdge predicate on the "ue" edge with a given conditions (other predicates).
|
||||
func HasUeWith(preds ...predicate.Ue) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UeInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, UeTable, UeColumn),
|
||||
)
|
||||
step := newUeStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
|
Reference in New Issue
Block a user