// Code generated by ent, DO NOT EDIT. package ue import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the ue type in the database. Label = "ue" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldLimit holds the string denoting the limit field in the database. FieldLimit = "limit" // FieldLimitBoss holds the string denoting the limit_boss field in the database. FieldLimitBoss = "limit_boss" // FieldLimitItem holds the string denoting the limit_item field in the database. FieldLimitItem = "limit_item" // FieldPassword holds the string denoting the password field in the database. FieldPassword = "password" // FieldLv holds the string denoting the lv field in the database. FieldLv = "lv" // FieldLvPoint holds the string denoting the lv_point field in the database. FieldLvPoint = "lv_point" // FieldModel holds the string denoting the model field in the database. FieldModel = "model" // FieldSword holds the string denoting the sword field in the database. FieldSword = "sword" // FieldCard holds the string denoting the card field in the database. FieldCard = "card" // FieldMode holds the string denoting the mode field in the database. FieldMode = "mode" // FieldToken holds the string denoting the token field in the database. FieldToken = "token" // FieldCp holds the string denoting the cp field in the database. FieldCp = "cp" // FieldCount holds the string denoting the count field in the database. FieldCount = "count" // FieldLocationX holds the string denoting the location_x field in the database. FieldLocationX = "location_x" // FieldLocationY holds the string denoting the location_y field in the database. FieldLocationY = "location_y" // FieldLocationZ holds the string denoting the location_z field in the database. FieldLocationZ = "location_z" // FieldLocationN holds the string denoting the location_n field in the database. FieldLocationN = "location_n" // FieldAuthor holds the string denoting the author field in the database. FieldAuthor = "author" // FieldGameLv holds the string denoting the game_lv field in the database. FieldGameLv = "game_lv" // FieldGameExp holds the string denoting the game_exp field in the database. FieldGameExp = "game_exp" // FieldGameID holds the string denoting the game_id field in the database. FieldGameID = "game_id" // FieldGameStory holds the string denoting the game_story field in the database. FieldGameStory = "game_story" // FieldGameEp holds the string denoting the game_ep field in the database. FieldGameEp = "game_ep" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // EdgeOwner holds the string denoting the owner edge name in mutations. EdgeOwner = "owner" // Table holds the table name of the ue in the database. Table = "ues" // OwnerTable is the table that holds the owner relation/edge. OwnerTable = "ues" // OwnerInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. OwnerInverseTable = "users" // OwnerColumn is the table column denoting the owner relation/edge. OwnerColumn = "user_ue" ) // Columns holds all SQL columns for ue fields. var Columns = []string{ FieldID, FieldLimit, FieldLimitBoss, FieldLimitItem, FieldPassword, FieldLv, FieldLvPoint, FieldModel, FieldSword, FieldCard, FieldMode, FieldToken, FieldCp, FieldCount, FieldLocationX, FieldLocationY, FieldLocationZ, FieldLocationN, FieldAuthor, FieldGameLv, FieldGameExp, FieldGameID, FieldGameStory, FieldGameEp, FieldCreatedAt, } // ForeignKeys holds the SQL foreign-keys that are owned by the "ues" // table and are not defined as standalone fields in the schema. var ForeignKeys = []string{ "user_ue", } // ValidColumn reports if the column name is valid (part of the table columns). func ValidColumn(column string) bool { for i := range Columns { if column == Columns[i] { return true } } for i := range ForeignKeys { if column == ForeignKeys[i] { return true } } return false } var ( // DefaultLimit holds the default value on creation for the "limit" field. DefaultLimit bool // DefaultLimitBoss holds the default value on creation for the "limit_boss" field. DefaultLimitBoss bool // DefaultLimitItem holds the default value on creation for the "limit_item" field. DefaultLimitItem bool // PasswordValidator is a validator for the "password" field. It is called by the builders before save. PasswordValidator func(string) error // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time ) // OrderOption defines the ordering options for the Ue 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() } // ByLimit orders the results by the limit field. func ByLimit(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLimit, opts...).ToFunc() } // ByLimitBoss orders the results by the limit_boss field. func ByLimitBoss(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLimitBoss, opts...).ToFunc() } // ByLimitItem orders the results by the limit_item field. func ByLimitItem(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLimitItem, opts...).ToFunc() } // ByPassword orders the results by the password field. func ByPassword(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPassword, opts...).ToFunc() } // ByLv orders the results by the lv field. func ByLv(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLv, opts...).ToFunc() } // ByLvPoint orders the results by the lv_point field. func ByLvPoint(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLvPoint, opts...).ToFunc() } // ByModel orders the results by the model field. func ByModel(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldModel, opts...).ToFunc() } // BySword orders the results by the sword field. func BySword(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldSword, opts...).ToFunc() } // ByCard orders the results by the card field. func ByCard(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCard, opts...).ToFunc() } // ByMode orders the results by the mode field. func ByMode(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMode, opts...).ToFunc() } // ByToken orders the results by the token field. func ByToken(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldToken, opts...).ToFunc() } // ByCp orders the results by the cp field. func ByCp(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCp, opts...).ToFunc() } // ByCount orders the results by the count field. func ByCount(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCount, opts...).ToFunc() } // ByLocationX orders the results by the location_x field. func ByLocationX(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocationX, opts...).ToFunc() } // ByLocationY orders the results by the location_y field. func ByLocationY(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocationY, opts...).ToFunc() } // ByLocationZ orders the results by the location_z field. func ByLocationZ(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocationZ, opts...).ToFunc() } // ByLocationN orders the results by the location_n field. func ByLocationN(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldLocationN, opts...).ToFunc() } // ByAuthor orders the results by the author field. func ByAuthor(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAuthor, opts...).ToFunc() } // ByGameLv orders the results by the game_lv field. func ByGameLv(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGameLv, opts...).ToFunc() } // ByGameExp orders the results by the game_exp field. func ByGameExp(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGameExp, opts...).ToFunc() } // ByGameID orders the results by the game_id field. func ByGameID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGameID, opts...).ToFunc() } // ByGameStory orders the results by the game_story field. func ByGameStory(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGameStory, opts...).ToFunc() } // ByGameEp orders the results by the game_ep field. func ByGameEp(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldGameEp, opts...).ToFunc() } // ByCreatedAt orders the results by the created_at field. func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldCreatedAt, opts...).ToFunc() } // ByOwnerField orders the results by owner field. func ByOwnerField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newOwnerStep(), sql.OrderByField(field, opts...)) } } func newOwnerStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(OwnerInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, OwnerTable, OwnerColumn), ) }