// Code generated by ent, DO NOT EDIT. package userthirdauth import ( "time" "entgo.io/ent/dialect/sql" ) const ( // Label holds the string label denoting the userthirdauth type in the database. Label = "user_third_auth" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldStatus holds the string denoting the status field in the database. FieldStatus = "status" // FieldTenantID holds the string denoting the tenant_id field in the database. FieldTenantID = "tenant_id" // FieldDeletedAt holds the string denoting the deleted_at field in the database. FieldDeletedAt = "deleted_at" // FieldUserID holds the string denoting the user_id field in the database. FieldUserID = "user_id" // FieldOpenid holds the string denoting the openid field in the database. FieldOpenid = "openid" // FieldUnionid holds the string denoting the unionid field in the database. FieldUnionid = "unionid" // FieldAccessToken holds the string denoting the access_token field in the database. FieldAccessToken = "access_token" // FieldRefreshToken holds the string denoting the refresh_token field in the database. FieldRefreshToken = "refresh_token" // FieldAccessTokenExpiry holds the string denoting the access_token_expiry field in the database. FieldAccessTokenExpiry = "access_token_expiry" // FieldUserInfo holds the string denoting the user_info field in the database. FieldUserInfo = "user_info" // FieldPlatformUserID holds the string denoting the platform_user_id field in the database. FieldPlatformUserID = "platform_user_id" // FieldNickname holds the string denoting the nickname field in the database. FieldNickname = "nickname" // FieldAvatar holds the string denoting the avatar field in the database. FieldAvatar = "avatar" // FieldEmail holds the string denoting the email field in the database. FieldEmail = "email" // FieldMobile holds the string denoting the mobile field in the database. FieldMobile = "mobile" // FieldIsBound holds the string denoting the is_bound field in the database. FieldIsBound = "is_bound" // FieldBoundAt holds the string denoting the bound_at field in the database. FieldBoundAt = "bound_at" // FieldExtraData holds the string denoting the extra_data field in the database. FieldExtraData = "extra_data" // Table holds the table name of the userthirdauth in the database. Table = "user_third_auths" ) // Columns holds all SQL columns for userthirdauth fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldStatus, FieldTenantID, FieldDeletedAt, FieldUserID, FieldOpenid, FieldUnionid, FieldAccessToken, FieldRefreshToken, FieldAccessTokenExpiry, FieldUserInfo, FieldPlatformUserID, FieldNickname, FieldAvatar, FieldEmail, FieldMobile, FieldIsBound, FieldBoundAt, FieldExtraData, } // 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 } } return false } var ( // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultUpdatedAt holds the default value on creation for the "updated_at" field. DefaultUpdatedAt func() time.Time // UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field. UpdateDefaultUpdatedAt func() time.Time // DefaultStatus holds the default value on creation for the "status" field. DefaultStatus uint8 // DefaultTenantID holds the default value on creation for the "tenant_id" field. DefaultTenantID uint64 // OpenidValidator is a validator for the "openid" field. It is called by the builders before save. OpenidValidator func(string) error // UnionidValidator is a validator for the "unionid" field. It is called by the builders before save. UnionidValidator func(string) error // AccessTokenValidator is a validator for the "access_token" field. It is called by the builders before save. AccessTokenValidator func(string) error // RefreshTokenValidator is a validator for the "refresh_token" field. It is called by the builders before save. RefreshTokenValidator func(string) error // PlatformUserIDValidator is a validator for the "platform_user_id" field. It is called by the builders before save. PlatformUserIDValidator func(string) error // NicknameValidator is a validator for the "nickname" field. It is called by the builders before save. NicknameValidator func(string) error // AvatarValidator is a validator for the "avatar" field. It is called by the builders before save. AvatarValidator func(string) error // EmailValidator is a validator for the "email" field. It is called by the builders before save. EmailValidator func(string) error // MobileValidator is a validator for the "mobile" field. It is called by the builders before save. MobileValidator func(string) error // DefaultIsBound holds the default value on creation for the "is_bound" field. DefaultIsBound bool // DefaultBoundAt holds the default value on creation for the "bound_at" field. DefaultBoundAt func() time.Time ) // OrderOption defines the ordering options for the UserThirdAuth 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() } // 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() } // ByStatus orders the results by the status field. func ByStatus(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldStatus, opts...).ToFunc() } // ByTenantID orders the results by the tenant_id field. func ByTenantID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldTenantID, opts...).ToFunc() } // ByDeletedAt orders the results by the deleted_at field. func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDeletedAt, opts...).ToFunc() } // ByUserID orders the results by the user_id field. func ByUserID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUserID, opts...).ToFunc() } // ByOpenid orders the results by the openid field. func ByOpenid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldOpenid, opts...).ToFunc() } // ByUnionid orders the results by the unionid field. func ByUnionid(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldUnionid, opts...).ToFunc() } // ByAccessToken orders the results by the access_token field. func ByAccessToken(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAccessToken, opts...).ToFunc() } // ByRefreshToken orders the results by the refresh_token field. func ByRefreshToken(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldRefreshToken, opts...).ToFunc() } // ByAccessTokenExpiry orders the results by the access_token_expiry field. func ByAccessTokenExpiry(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAccessTokenExpiry, opts...).ToFunc() } // ByPlatformUserID orders the results by the platform_user_id field. func ByPlatformUserID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPlatformUserID, opts...).ToFunc() } // ByNickname orders the results by the nickname field. func ByNickname(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldNickname, opts...).ToFunc() } // ByAvatar orders the results by the avatar field. func ByAvatar(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAvatar, opts...).ToFunc() } // ByEmail orders the results by the email field. func ByEmail(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldEmail, opts...).ToFunc() } // ByMobile orders the results by the mobile field. func ByMobile(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldMobile, opts...).ToFunc() } // ByIsBound orders the results by the is_bound field. func ByIsBound(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldIsBound, opts...).ToFunc() } // ByBoundAt orders the results by the bound_at field. func ByBoundAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldBoundAt, opts...).ToFunc() }