You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
657 lines
25 KiB
657 lines
25 KiB
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package user
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"entgo.io/ent"
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"github.com/cloudreve/Cloudreve/v4/inventory/types"
|
|
)
|
|
|
|
const (
|
|
// Label holds the string label denoting the user type in the database.
|
|
Label = "user"
|
|
// 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"
|
|
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
|
|
FieldDeletedAt = "deleted_at"
|
|
// FieldEmail holds the string denoting the email field in the database.
|
|
FieldEmail = "email"
|
|
// FieldNick holds the string denoting the nick field in the database.
|
|
FieldNick = "nick"
|
|
// FieldPassword holds the string denoting the password field in the database.
|
|
FieldPassword = "password"
|
|
// FieldStatus holds the string denoting the status field in the database.
|
|
FieldStatus = "status"
|
|
// FieldBanExpires holds the string denoting the ban_expires field in the database.
|
|
FieldBanExpires = "ban_expires"
|
|
// FieldBanReason holds the string denoting the ban_reason field in the database.
|
|
FieldBanReason = "ban_reason"
|
|
// FieldLastLogin holds the string denoting the last_login field in the database.
|
|
FieldLastLogin = "last_login"
|
|
// FieldStorage holds the string denoting the storage field in the database.
|
|
FieldStorage = "storage"
|
|
// FieldCredits holds the string denoting the credits field in the database.
|
|
FieldCredits = "credits"
|
|
// FieldTwoFactorSecret holds the string denoting the two_factor_secret field in the database.
|
|
FieldTwoFactorSecret = "two_factor_secret"
|
|
// FieldVaultPassword holds the string denoting the vault_password field in the database.
|
|
FieldVaultPassword = "vault_password"
|
|
// FieldVaultFolder holds the string denoting the vault_folder field in the database.
|
|
FieldVaultFolder = "vault_folder"
|
|
// FieldTwoFactorBackupCodes holds the string denoting the two_factor_backup_codes field in the database.
|
|
FieldTwoFactorBackupCodes = "two_factor_backup_codes"
|
|
// FieldAvatar holds the string denoting the avatar field in the database.
|
|
FieldAvatar = "avatar"
|
|
// FieldSettings holds the string denoting the settings field in the database.
|
|
FieldSettings = "settings"
|
|
// FieldGroupUsers holds the string denoting the group_users field in the database.
|
|
FieldGroupUsers = "group_users"
|
|
// EdgeGroup holds the string denoting the group edge name in mutations.
|
|
EdgeGroup = "group"
|
|
// EdgeFiles holds the string denoting the files edge name in mutations.
|
|
EdgeFiles = "files"
|
|
// EdgeDavAccounts holds the string denoting the dav_accounts edge name in mutations.
|
|
EdgeDavAccounts = "dav_accounts"
|
|
// EdgeShares holds the string denoting the shares edge name in mutations.
|
|
EdgeShares = "shares"
|
|
// EdgePasskey holds the string denoting the passkey edge name in mutations.
|
|
EdgePasskey = "passkey"
|
|
// EdgeTasks holds the string denoting the tasks edge name in mutations.
|
|
EdgeTasks = "tasks"
|
|
// EdgeFsevents holds the string denoting the fsevents edge name in mutations.
|
|
EdgeFsevents = "fsevents"
|
|
// EdgeEntities holds the string denoting the entities edge name in mutations.
|
|
EdgeEntities = "entities"
|
|
// EdgeOauthGrants holds the string denoting the oauth_grants edge name in mutations.
|
|
EdgeOauthGrants = "oauth_grants"
|
|
// EdgeCreditTxns holds the string denoting the credit_txns edge name in mutations.
|
|
EdgeCreditTxns = "credit_txns"
|
|
// EdgeRedeemedCodes holds the string denoting the redeemed_codes edge name in mutations.
|
|
EdgeRedeemedCodes = "redeemed_codes"
|
|
// EdgeGrants holds the string denoting the grants edge name in mutations.
|
|
EdgeGrants = "grants"
|
|
// EdgeSharePurchases holds the string denoting the share_purchases edge name in mutations.
|
|
EdgeSharePurchases = "share_purchases"
|
|
// EdgeSSOBindings holds the string denoting the sso_bindings edge name in mutations.
|
|
EdgeSSOBindings = "sso_bindings"
|
|
// Table holds the table name of the user in the database.
|
|
Table = "users"
|
|
// GroupTable is the table that holds the group relation/edge.
|
|
GroupTable = "users"
|
|
// GroupInverseTable is the table name for the Group entity.
|
|
// It exists in this package in order to avoid circular dependency with the "group" package.
|
|
GroupInverseTable = "groups"
|
|
// GroupColumn is the table column denoting the group relation/edge.
|
|
GroupColumn = "group_users"
|
|
// FilesTable is the table that holds the files relation/edge.
|
|
FilesTable = "files"
|
|
// FilesInverseTable is the table name for the File entity.
|
|
// It exists in this package in order to avoid circular dependency with the "file" package.
|
|
FilesInverseTable = "files"
|
|
// FilesColumn is the table column denoting the files relation/edge.
|
|
FilesColumn = "owner_id"
|
|
// DavAccountsTable is the table that holds the dav_accounts relation/edge.
|
|
DavAccountsTable = "dav_accounts"
|
|
// DavAccountsInverseTable is the table name for the DavAccount entity.
|
|
// It exists in this package in order to avoid circular dependency with the "davaccount" package.
|
|
DavAccountsInverseTable = "dav_accounts"
|
|
// DavAccountsColumn is the table column denoting the dav_accounts relation/edge.
|
|
DavAccountsColumn = "owner_id"
|
|
// SharesTable is the table that holds the shares relation/edge.
|
|
SharesTable = "shares"
|
|
// SharesInverseTable is the table name for the Share entity.
|
|
// It exists in this package in order to avoid circular dependency with the "share" package.
|
|
SharesInverseTable = "shares"
|
|
// SharesColumn is the table column denoting the shares relation/edge.
|
|
SharesColumn = "user_shares"
|
|
// PasskeyTable is the table that holds the passkey relation/edge.
|
|
PasskeyTable = "passkeys"
|
|
// PasskeyInverseTable is the table name for the Passkey entity.
|
|
// It exists in this package in order to avoid circular dependency with the "passkey" package.
|
|
PasskeyInverseTable = "passkeys"
|
|
// PasskeyColumn is the table column denoting the passkey relation/edge.
|
|
PasskeyColumn = "user_id"
|
|
// TasksTable is the table that holds the tasks relation/edge.
|
|
TasksTable = "tasks"
|
|
// TasksInverseTable is the table name for the Task entity.
|
|
// It exists in this package in order to avoid circular dependency with the "task" package.
|
|
TasksInverseTable = "tasks"
|
|
// TasksColumn is the table column denoting the tasks relation/edge.
|
|
TasksColumn = "user_tasks"
|
|
// FseventsTable is the table that holds the fsevents relation/edge.
|
|
FseventsTable = "fs_events"
|
|
// FseventsInverseTable is the table name for the FsEvent entity.
|
|
// It exists in this package in order to avoid circular dependency with the "fsevent" package.
|
|
FseventsInverseTable = "fs_events"
|
|
// FseventsColumn is the table column denoting the fsevents relation/edge.
|
|
FseventsColumn = "user_fsevent"
|
|
// EntitiesTable is the table that holds the entities relation/edge.
|
|
EntitiesTable = "entities"
|
|
// EntitiesInverseTable is the table name for the Entity entity.
|
|
// It exists in this package in order to avoid circular dependency with the "entity" package.
|
|
EntitiesInverseTable = "entities"
|
|
// EntitiesColumn is the table column denoting the entities relation/edge.
|
|
EntitiesColumn = "created_by"
|
|
// OauthGrantsTable is the table that holds the oauth_grants relation/edge.
|
|
OauthGrantsTable = "oauth_grants"
|
|
// OauthGrantsInverseTable is the table name for the OAuthGrant entity.
|
|
// It exists in this package in order to avoid circular dependency with the "oauthgrant" package.
|
|
OauthGrantsInverseTable = "oauth_grants"
|
|
// OauthGrantsColumn is the table column denoting the oauth_grants relation/edge.
|
|
OauthGrantsColumn = "user_id"
|
|
// CreditTxnsTable is the table that holds the credit_txns relation/edge.
|
|
CreditTxnsTable = "credit_txns"
|
|
// CreditTxnsInverseTable is the table name for the CreditTxn entity.
|
|
// It exists in this package in order to avoid circular dependency with the "credittxn" package.
|
|
CreditTxnsInverseTable = "credit_txns"
|
|
// CreditTxnsColumn is the table column denoting the credit_txns relation/edge.
|
|
CreditTxnsColumn = "user_id"
|
|
// RedeemedCodesTable is the table that holds the redeemed_codes relation/edge.
|
|
RedeemedCodesTable = "gift_codes"
|
|
// RedeemedCodesInverseTable is the table name for the GiftCode entity.
|
|
// It exists in this package in order to avoid circular dependency with the "giftcode" package.
|
|
RedeemedCodesInverseTable = "gift_codes"
|
|
// RedeemedCodesColumn is the table column denoting the redeemed_codes relation/edge.
|
|
RedeemedCodesColumn = "used_by_id"
|
|
// GrantsTable is the table that holds the grants relation/edge.
|
|
GrantsTable = "user_grants"
|
|
// GrantsInverseTable is the table name for the UserGrant entity.
|
|
// It exists in this package in order to avoid circular dependency with the "usergrant" package.
|
|
GrantsInverseTable = "user_grants"
|
|
// GrantsColumn is the table column denoting the grants relation/edge.
|
|
GrantsColumn = "user_id"
|
|
// SharePurchasesTable is the table that holds the share_purchases relation/edge.
|
|
SharePurchasesTable = "share_purchases"
|
|
// SharePurchasesInverseTable is the table name for the SharePurchase entity.
|
|
// It exists in this package in order to avoid circular dependency with the "sharepurchase" package.
|
|
SharePurchasesInverseTable = "share_purchases"
|
|
// SharePurchasesColumn is the table column denoting the share_purchases relation/edge.
|
|
SharePurchasesColumn = "buyer_id"
|
|
// SSOBindingsTable is the table that holds the sso_bindings relation/edge.
|
|
SSOBindingsTable = "sso_bindings"
|
|
// SSOBindingsInverseTable is the table name for the SsoBinding entity.
|
|
// It exists in this package in order to avoid circular dependency with the "ssobinding" package.
|
|
SSOBindingsInverseTable = "sso_bindings"
|
|
// SSOBindingsColumn is the table column denoting the sso_bindings relation/edge.
|
|
SSOBindingsColumn = "user_id"
|
|
)
|
|
|
|
// Columns holds all SQL columns for user fields.
|
|
var Columns = []string{
|
|
FieldID,
|
|
FieldCreatedAt,
|
|
FieldUpdatedAt,
|
|
FieldDeletedAt,
|
|
FieldEmail,
|
|
FieldNick,
|
|
FieldPassword,
|
|
FieldStatus,
|
|
FieldBanExpires,
|
|
FieldBanReason,
|
|
FieldLastLogin,
|
|
FieldStorage,
|
|
FieldCredits,
|
|
FieldTwoFactorSecret,
|
|
FieldVaultPassword,
|
|
FieldVaultFolder,
|
|
FieldTwoFactorBackupCodes,
|
|
FieldAvatar,
|
|
FieldSettings,
|
|
FieldGroupUsers,
|
|
}
|
|
|
|
// 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
|
|
}
|
|
|
|
// Note that the variables below are initialized by the runtime
|
|
// package on the initialization of the application. Therefore,
|
|
// it should be imported in the main as follows:
|
|
//
|
|
// import _ "github.com/cloudreve/Cloudreve/v4/ent/runtime"
|
|
var (
|
|
Hooks [1]ent.Hook
|
|
Interceptors [1]ent.Interceptor
|
|
// 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
|
|
// EmailValidator is a validator for the "email" field. It is called by the builders before save.
|
|
EmailValidator func(string) error
|
|
// NickValidator is a validator for the "nick" field. It is called by the builders before save.
|
|
NickValidator func(string) error
|
|
// DefaultStorage holds the default value on creation for the "storage" field.
|
|
DefaultStorage int64
|
|
// DefaultCredits holds the default value on creation for the "credits" field.
|
|
DefaultCredits int64
|
|
// DefaultVaultFolder holds the default value on creation for the "vault_folder" field.
|
|
DefaultVaultFolder int
|
|
// DefaultSettings holds the default value on creation for the "settings" field.
|
|
DefaultSettings *types.UserSetting
|
|
)
|
|
|
|
// Status defines the type for the "status" enum field.
|
|
type Status string
|
|
|
|
// StatusActive is the default value of the Status enum.
|
|
const DefaultStatus = StatusActive
|
|
|
|
// Status values.
|
|
const (
|
|
StatusActive Status = "active"
|
|
StatusInactive Status = "inactive"
|
|
StatusManualBanned Status = "manual_banned"
|
|
StatusSysBanned Status = "sys_banned"
|
|
)
|
|
|
|
func (s Status) String() string {
|
|
return string(s)
|
|
}
|
|
|
|
// StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.
|
|
func StatusValidator(s Status) error {
|
|
switch s {
|
|
case StatusActive, StatusInactive, StatusManualBanned, StatusSysBanned:
|
|
return nil
|
|
default:
|
|
return fmt.Errorf("user: invalid enum value for status field: %q", s)
|
|
}
|
|
}
|
|
|
|
// 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()
|
|
}
|
|
|
|
// 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()
|
|
}
|
|
|
|
// ByDeletedAt orders the results by the deleted_at field.
|
|
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
|
|
}
|
|
|
|
// ByEmail orders the results by the email field.
|
|
func ByEmail(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldEmail, opts...).ToFunc()
|
|
}
|
|
|
|
// ByNick orders the results by the nick field.
|
|
func ByNick(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldNick, opts...).ToFunc()
|
|
}
|
|
|
|
// ByPassword orders the results by the password field.
|
|
func ByPassword(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldPassword, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStatus orders the results by the status field.
|
|
func ByStatus(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStatus, opts...).ToFunc()
|
|
}
|
|
|
|
// ByBanExpires orders the results by the ban_expires field.
|
|
func ByBanExpires(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldBanExpires, opts...).ToFunc()
|
|
}
|
|
|
|
// ByBanReason orders the results by the ban_reason field.
|
|
func ByBanReason(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldBanReason, opts...).ToFunc()
|
|
}
|
|
|
|
// ByLastLogin orders the results by the last_login field.
|
|
func ByLastLogin(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldLastLogin, opts...).ToFunc()
|
|
}
|
|
|
|
// ByStorage orders the results by the storage field.
|
|
func ByStorage(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldStorage, opts...).ToFunc()
|
|
}
|
|
|
|
// ByCredits orders the results by the credits field.
|
|
func ByCredits(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldCredits, opts...).ToFunc()
|
|
}
|
|
|
|
// ByTwoFactorSecret orders the results by the two_factor_secret field.
|
|
func ByTwoFactorSecret(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldTwoFactorSecret, opts...).ToFunc()
|
|
}
|
|
|
|
// ByVaultPassword orders the results by the vault_password field.
|
|
func ByVaultPassword(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldVaultPassword, opts...).ToFunc()
|
|
}
|
|
|
|
// ByVaultFolder orders the results by the vault_folder field.
|
|
func ByVaultFolder(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldVaultFolder, opts...).ToFunc()
|
|
}
|
|
|
|
// ByAvatar orders the results by the avatar field.
|
|
func ByAvatar(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldAvatar, opts...).ToFunc()
|
|
}
|
|
|
|
// ByGroupUsers orders the results by the group_users field.
|
|
func ByGroupUsers(opts ...sql.OrderTermOption) OrderOption {
|
|
return sql.OrderByField(FieldGroupUsers, opts...).ToFunc()
|
|
}
|
|
|
|
// ByGroupField orders the results by group field.
|
|
func ByGroupField(field string, opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newGroupStep(), sql.OrderByField(field, opts...))
|
|
}
|
|
}
|
|
|
|
// ByFilesCount orders the results by files count.
|
|
func ByFilesCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newFilesStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByFiles orders the results by files terms.
|
|
func ByFiles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newFilesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByDavAccountsCount orders the results by dav_accounts count.
|
|
func ByDavAccountsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newDavAccountsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByDavAccounts orders the results by dav_accounts terms.
|
|
func ByDavAccounts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newDavAccountsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// BySharesCount orders the results by shares count.
|
|
func BySharesCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newSharesStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByShares orders the results by shares terms.
|
|
func ByShares(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newSharesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByPasskeyCount orders the results by passkey count.
|
|
func ByPasskeyCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newPasskeyStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByPasskey orders the results by passkey terms.
|
|
func ByPasskey(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newPasskeyStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByTasksCount orders the results by tasks count.
|
|
func ByTasksCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newTasksStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByTasks orders the results by tasks terms.
|
|
func ByTasks(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newTasksStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByFseventsCount orders the results by fsevents count.
|
|
func ByFseventsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newFseventsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByFsevents orders the results by fsevents terms.
|
|
func ByFsevents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newFseventsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByEntitiesCount orders the results by entities count.
|
|
func ByEntitiesCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newEntitiesStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByEntities orders the results by entities terms.
|
|
func ByEntities(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newEntitiesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByOauthGrantsCount orders the results by oauth_grants count.
|
|
func ByOauthGrantsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newOauthGrantsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByOauthGrants orders the results by oauth_grants terms.
|
|
func ByOauthGrants(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newOauthGrantsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByCreditTxnsCount orders the results by credit_txns count.
|
|
func ByCreditTxnsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newCreditTxnsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByCreditTxns orders the results by credit_txns terms.
|
|
func ByCreditTxns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newCreditTxnsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByRedeemedCodesCount orders the results by redeemed_codes count.
|
|
func ByRedeemedCodesCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newRedeemedCodesStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByRedeemedCodes orders the results by redeemed_codes terms.
|
|
func ByRedeemedCodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newRedeemedCodesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// ByGrantsCount orders the results by grants count.
|
|
func ByGrantsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newGrantsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// ByGrants orders the results by grants terms.
|
|
func ByGrants(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newGrantsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// BySharePurchasesCount orders the results by share_purchases count.
|
|
func BySharePurchasesCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newSharePurchasesStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// BySharePurchases orders the results by share_purchases terms.
|
|
func BySharePurchases(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newSharePurchasesStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
|
|
// BySSOBindingsCount orders the results by sso_bindings count.
|
|
func BySSOBindingsCount(opts ...sql.OrderTermOption) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborsCount(s, newSSOBindingsStep(), opts...)
|
|
}
|
|
}
|
|
|
|
// BySSOBindings orders the results by sso_bindings terms.
|
|
func BySSOBindings(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
|
return func(s *sql.Selector) {
|
|
sqlgraph.OrderByNeighborTerms(s, newSSOBindingsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
|
}
|
|
}
|
|
func newGroupStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(GroupInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.M2O, true, GroupTable, GroupColumn),
|
|
)
|
|
}
|
|
func newFilesStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(FilesInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, FilesTable, FilesColumn),
|
|
)
|
|
}
|
|
func newDavAccountsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(DavAccountsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, DavAccountsTable, DavAccountsColumn),
|
|
)
|
|
}
|
|
func newSharesStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(SharesInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, SharesTable, SharesColumn),
|
|
)
|
|
}
|
|
func newPasskeyStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(PasskeyInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, PasskeyTable, PasskeyColumn),
|
|
)
|
|
}
|
|
func newTasksStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(TasksInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, TasksTable, TasksColumn),
|
|
)
|
|
}
|
|
func newFseventsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(FseventsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, FseventsTable, FseventsColumn),
|
|
)
|
|
}
|
|
func newEntitiesStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(EntitiesInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, EntitiesTable, EntitiesColumn),
|
|
)
|
|
}
|
|
func newOauthGrantsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(OauthGrantsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, OauthGrantsTable, OauthGrantsColumn),
|
|
)
|
|
}
|
|
func newCreditTxnsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(CreditTxnsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, CreditTxnsTable, CreditTxnsColumn),
|
|
)
|
|
}
|
|
func newRedeemedCodesStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(RedeemedCodesInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, RedeemedCodesTable, RedeemedCodesColumn),
|
|
)
|
|
}
|
|
func newGrantsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(GrantsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, GrantsTable, GrantsColumn),
|
|
)
|
|
}
|
|
func newSharePurchasesStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(SharePurchasesInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, SharePurchasesTable, SharePurchasesColumn),
|
|
)
|
|
}
|
|
func newSSOBindingsStep() *sqlgraph.Step {
|
|
return sqlgraph.NewStep(
|
|
sqlgraph.From(Table, FieldID),
|
|
sqlgraph.To(SSOBindingsInverseTable, FieldID),
|
|
sqlgraph.Edge(sqlgraph.O2M, false, SSOBindingsTable, SSOBindingsColumn),
|
|
)
|
|
}
|