account.go•35.6 kB
// Code generated by ent, DO NOT EDIT.
package account
import (
"fmt"
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/rs/xid"
)
const (
// Label holds the string label denoting the account type in the database.
Label = "account"
// 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"
// FieldIndexedAt holds the string denoting the indexed_at field in the database.
FieldIndexedAt = "indexed_at"
// FieldHandle holds the string denoting the handle field in the database.
FieldHandle = "handle"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldBio holds the string denoting the bio field in the database.
FieldBio = "bio"
// FieldKind holds the string denoting the kind field in the database.
FieldKind = "kind"
// FieldAdmin holds the string denoting the admin field in the database.
FieldAdmin = "admin"
// FieldLinks holds the string denoting the links field in the database.
FieldLinks = "links"
// FieldMetadata holds the string denoting the metadata field in the database.
FieldMetadata = "metadata"
// FieldInvitedByID holds the string denoting the invited_by_id field in the database.
FieldInvitedByID = "invited_by_id"
// EdgeSessions holds the string denoting the sessions edge name in mutations.
EdgeSessions = "sessions"
// EdgeEmails holds the string denoting the emails edge name in mutations.
EdgeEmails = "emails"
// EdgeNotifications holds the string denoting the notifications edge name in mutations.
EdgeNotifications = "notifications"
// EdgeTriggeredNotifications holds the string denoting the triggered_notifications edge name in mutations.
EdgeTriggeredNotifications = "triggered_notifications"
// EdgeFollowing holds the string denoting the following edge name in mutations.
EdgeFollowing = "following"
// EdgeFollowedBy holds the string denoting the followed_by edge name in mutations.
EdgeFollowedBy = "followed_by"
// EdgeInvitations holds the string denoting the invitations edge name in mutations.
EdgeInvitations = "invitations"
// EdgeInvitedBy holds the string denoting the invited_by edge name in mutations.
EdgeInvitedBy = "invited_by"
// EdgePosts holds the string denoting the posts edge name in mutations.
EdgePosts = "posts"
// EdgeQuestions holds the string denoting the questions edge name in mutations.
EdgeQuestions = "questions"
// EdgeReacts holds the string denoting the reacts edge name in mutations.
EdgeReacts = "reacts"
// EdgeLikes holds the string denoting the likes edge name in mutations.
EdgeLikes = "likes"
// EdgeMentions holds the string denoting the mentions edge name in mutations.
EdgeMentions = "mentions"
// EdgeRoles holds the string denoting the roles edge name in mutations.
EdgeRoles = "roles"
// EdgeAuthentication holds the string denoting the authentication edge name in mutations.
EdgeAuthentication = "authentication"
// EdgeTags holds the string denoting the tags edge name in mutations.
EdgeTags = "tags"
// EdgeCollections holds the string denoting the collections edge name in mutations.
EdgeCollections = "collections"
// EdgeNodes holds the string denoting the nodes edge name in mutations.
EdgeNodes = "nodes"
// EdgeAssets holds the string denoting the assets edge name in mutations.
EdgeAssets = "assets"
// EdgeEvents holds the string denoting the events edge name in mutations.
EdgeEvents = "events"
// EdgePostReads holds the string denoting the post_reads edge name in mutations.
EdgePostReads = "post_reads"
// EdgeReports holds the string denoting the reports edge name in mutations.
EdgeReports = "reports"
// EdgeHandledReports holds the string denoting the handled_reports edge name in mutations.
EdgeHandledReports = "handled_reports"
// EdgeAccountRoles holds the string denoting the account_roles edge name in mutations.
EdgeAccountRoles = "account_roles"
// Table holds the table name of the account in the database.
Table = "accounts"
// SessionsTable is the table that holds the sessions relation/edge.
SessionsTable = "sessions"
// SessionsInverseTable is the table name for the Session entity.
// It exists in this package in order to avoid circular dependency with the "session" package.
SessionsInverseTable = "sessions"
// SessionsColumn is the table column denoting the sessions relation/edge.
SessionsColumn = "account_id"
// EmailsTable is the table that holds the emails relation/edge.
EmailsTable = "emails"
// EmailsInverseTable is the table name for the Email entity.
// It exists in this package in order to avoid circular dependency with the "email" package.
EmailsInverseTable = "emails"
// EmailsColumn is the table column denoting the emails relation/edge.
EmailsColumn = "account_id"
// NotificationsTable is the table that holds the notifications relation/edge.
NotificationsTable = "notifications"
// NotificationsInverseTable is the table name for the Notification entity.
// It exists in this package in order to avoid circular dependency with the "notification" package.
NotificationsInverseTable = "notifications"
// NotificationsColumn is the table column denoting the notifications relation/edge.
NotificationsColumn = "owner_account_id"
// TriggeredNotificationsTable is the table that holds the triggered_notifications relation/edge.
TriggeredNotificationsTable = "notifications"
// TriggeredNotificationsInverseTable is the table name for the Notification entity.
// It exists in this package in order to avoid circular dependency with the "notification" package.
TriggeredNotificationsInverseTable = "notifications"
// TriggeredNotificationsColumn is the table column denoting the triggered_notifications relation/edge.
TriggeredNotificationsColumn = "source_account_id"
// FollowingTable is the table that holds the following relation/edge.
FollowingTable = "account_follows"
// FollowingInverseTable is the table name for the AccountFollow entity.
// It exists in this package in order to avoid circular dependency with the "accountfollow" package.
FollowingInverseTable = "account_follows"
// FollowingColumn is the table column denoting the following relation/edge.
FollowingColumn = "follower_account_id"
// FollowedByTable is the table that holds the followed_by relation/edge.
FollowedByTable = "account_follows"
// FollowedByInverseTable is the table name for the AccountFollow entity.
// It exists in this package in order to avoid circular dependency with the "accountfollow" package.
FollowedByInverseTable = "account_follows"
// FollowedByColumn is the table column denoting the followed_by relation/edge.
FollowedByColumn = "following_account_id"
// InvitationsTable is the table that holds the invitations relation/edge.
InvitationsTable = "invitations"
// InvitationsInverseTable is the table name for the Invitation entity.
// It exists in this package in order to avoid circular dependency with the "invitation" package.
InvitationsInverseTable = "invitations"
// InvitationsColumn is the table column denoting the invitations relation/edge.
InvitationsColumn = "creator_account_id"
// InvitedByTable is the table that holds the invited_by relation/edge.
InvitedByTable = "accounts"
// InvitedByInverseTable is the table name for the Invitation entity.
// It exists in this package in order to avoid circular dependency with the "invitation" package.
InvitedByInverseTable = "invitations"
// InvitedByColumn is the table column denoting the invited_by relation/edge.
InvitedByColumn = "invited_by_id"
// PostsTable is the table that holds the posts relation/edge.
PostsTable = "posts"
// PostsInverseTable is the table name for the Post entity.
// It exists in this package in order to avoid circular dependency with the "post" package.
PostsInverseTable = "posts"
// PostsColumn is the table column denoting the posts relation/edge.
PostsColumn = "account_posts"
// QuestionsTable is the table that holds the questions relation/edge.
QuestionsTable = "questions"
// QuestionsInverseTable is the table name for the Question entity.
// It exists in this package in order to avoid circular dependency with the "question" package.
QuestionsInverseTable = "questions"
// QuestionsColumn is the table column denoting the questions relation/edge.
QuestionsColumn = "account_id"
// ReactsTable is the table that holds the reacts relation/edge.
ReactsTable = "reacts"
// ReactsInverseTable is the table name for the React entity.
// It exists in this package in order to avoid circular dependency with the "react" package.
ReactsInverseTable = "reacts"
// ReactsColumn is the table column denoting the reacts relation/edge.
ReactsColumn = "account_id"
// LikesTable is the table that holds the likes relation/edge.
LikesTable = "like_posts"
// LikesInverseTable is the table name for the LikePost entity.
// It exists in this package in order to avoid circular dependency with the "likepost" package.
LikesInverseTable = "like_posts"
// LikesColumn is the table column denoting the likes relation/edge.
LikesColumn = "account_id"
// MentionsTable is the table that holds the mentions relation/edge.
MentionsTable = "mention_profiles"
// MentionsInverseTable is the table name for the MentionProfile entity.
// It exists in this package in order to avoid circular dependency with the "mentionprofile" package.
MentionsInverseTable = "mention_profiles"
// MentionsColumn is the table column denoting the mentions relation/edge.
MentionsColumn = "account_id"
// RolesTable is the table that holds the roles relation/edge. The primary key declared below.
RolesTable = "account_roles"
// RolesInverseTable is the table name for the Role entity.
// It exists in this package in order to avoid circular dependency with the "role" package.
RolesInverseTable = "roles"
// AuthenticationTable is the table that holds the authentication relation/edge.
AuthenticationTable = "authentications"
// AuthenticationInverseTable is the table name for the Authentication entity.
// It exists in this package in order to avoid circular dependency with the "authentication" package.
AuthenticationInverseTable = "authentications"
// AuthenticationColumn is the table column denoting the authentication relation/edge.
AuthenticationColumn = "account_authentication"
// TagsTable is the table that holds the tags relation/edge. The primary key declared below.
TagsTable = "account_tags"
// TagsInverseTable is the table name for the Tag entity.
// It exists in this package in order to avoid circular dependency with the "tag" package.
TagsInverseTable = "tags"
// CollectionsTable is the table that holds the collections relation/edge.
CollectionsTable = "collections"
// CollectionsInverseTable is the table name for the Collection entity.
// It exists in this package in order to avoid circular dependency with the "collection" package.
CollectionsInverseTable = "collections"
// CollectionsColumn is the table column denoting the collections relation/edge.
CollectionsColumn = "account_collections"
// NodesTable is the table that holds the nodes relation/edge.
NodesTable = "nodes"
// NodesInverseTable is the table name for the Node entity.
// It exists in this package in order to avoid circular dependency with the "node" package.
NodesInverseTable = "nodes"
// NodesColumn is the table column denoting the nodes relation/edge.
NodesColumn = "account_id"
// AssetsTable is the table that holds the assets relation/edge.
AssetsTable = "assets"
// AssetsInverseTable is the table name for the Asset entity.
// It exists in this package in order to avoid circular dependency with the "asset" package.
AssetsInverseTable = "assets"
// AssetsColumn is the table column denoting the assets relation/edge.
AssetsColumn = "account_id"
// EventsTable is the table that holds the events relation/edge.
EventsTable = "event_participants"
// EventsInverseTable is the table name for the EventParticipant entity.
// It exists in this package in order to avoid circular dependency with the "eventparticipant" package.
EventsInverseTable = "event_participants"
// EventsColumn is the table column denoting the events relation/edge.
EventsColumn = "account_id"
// PostReadsTable is the table that holds the post_reads relation/edge.
PostReadsTable = "post_reads"
// PostReadsInverseTable is the table name for the PostRead entity.
// It exists in this package in order to avoid circular dependency with the "postread" package.
PostReadsInverseTable = "post_reads"
// PostReadsColumn is the table column denoting the post_reads relation/edge.
PostReadsColumn = "account_id"
// ReportsTable is the table that holds the reports relation/edge.
ReportsTable = "reports"
// ReportsInverseTable is the table name for the Report entity.
// It exists in this package in order to avoid circular dependency with the "report" package.
ReportsInverseTable = "reports"
// ReportsColumn is the table column denoting the reports relation/edge.
ReportsColumn = "reported_by_id"
// HandledReportsTable is the table that holds the handled_reports relation/edge.
HandledReportsTable = "reports"
// HandledReportsInverseTable is the table name for the Report entity.
// It exists in this package in order to avoid circular dependency with the "report" package.
HandledReportsInverseTable = "reports"
// HandledReportsColumn is the table column denoting the handled_reports relation/edge.
HandledReportsColumn = "handled_by_id"
// AccountRolesTable is the table that holds the account_roles relation/edge.
AccountRolesTable = "account_roles"
// AccountRolesInverseTable is the table name for the AccountRoles entity.
// It exists in this package in order to avoid circular dependency with the "accountroles" package.
AccountRolesInverseTable = "account_roles"
// AccountRolesColumn is the table column denoting the account_roles relation/edge.
AccountRolesColumn = "account_id"
)
// Columns holds all SQL columns for account fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldDeletedAt,
FieldIndexedAt,
FieldHandle,
FieldName,
FieldBio,
FieldKind,
FieldAdmin,
FieldLinks,
FieldMetadata,
FieldInvitedByID,
}
var (
// RolesPrimaryKey and RolesColumn2 are the table columns denoting the
// primary key for the roles relation (M2M).
RolesPrimaryKey = []string{"role_id", "account_id"}
// TagsPrimaryKey and TagsColumn2 are the table columns denoting the
// primary key for the tags relation (M2M).
TagsPrimaryKey = []string{"account_id", "tag_id"}
)
// 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
// HandleValidator is a validator for the "handle" field. It is called by the builders before save.
HandleValidator func(string) error
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultAdmin holds the default value on creation for the "admin" field.
DefaultAdmin bool
// DefaultID holds the default value on creation for the "id" field.
DefaultID func() xid.ID
// IDValidator is a validator for the "id" field. It is called by the builders before save.
IDValidator func(string) error
)
// Kind defines the type for the "kind" enum field.
type Kind string
// KindHuman is the default value of the Kind enum.
const DefaultKind = KindHuman
// Kind values.
const (
KindHuman Kind = "human"
KindBot Kind = "bot"
)
func (k Kind) String() string {
return string(k)
}
// KindValidator is a validator for the "kind" field enum values. It is called by the builders before save.
func KindValidator(k Kind) error {
switch k {
case KindHuman, KindBot:
return nil
default:
return fmt.Errorf("account: invalid enum value for kind field: %q", k)
}
}
// OrderOption defines the ordering options for the Account 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()
}
// ByIndexedAt orders the results by the indexed_at field.
func ByIndexedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldIndexedAt, opts...).ToFunc()
}
// ByHandle orders the results by the handle field.
func ByHandle(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldHandle, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByBio orders the results by the bio field.
func ByBio(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBio, opts...).ToFunc()
}
// ByKind orders the results by the kind field.
func ByKind(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldKind, opts...).ToFunc()
}
// ByAdmin orders the results by the admin field.
func ByAdmin(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldAdmin, opts...).ToFunc()
}
// ByInvitedByID orders the results by the invited_by_id field.
func ByInvitedByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldInvitedByID, opts...).ToFunc()
}
// BySessionsCount orders the results by sessions count.
func BySessionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newSessionsStep(), opts...)
}
}
// BySessions orders the results by sessions terms.
func BySessions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newSessionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByEmailsCount orders the results by emails count.
func ByEmailsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newEmailsStep(), opts...)
}
}
// ByEmails orders the results by emails terms.
func ByEmails(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newEmailsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByNotificationsCount orders the results by notifications count.
func ByNotificationsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newNotificationsStep(), opts...)
}
}
// ByNotifications orders the results by notifications terms.
func ByNotifications(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newNotificationsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByTriggeredNotificationsCount orders the results by triggered_notifications count.
func ByTriggeredNotificationsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newTriggeredNotificationsStep(), opts...)
}
}
// ByTriggeredNotifications orders the results by triggered_notifications terms.
func ByTriggeredNotifications(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newTriggeredNotificationsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByFollowingCount orders the results by following count.
func ByFollowingCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newFollowingStep(), opts...)
}
}
// ByFollowing orders the results by following terms.
func ByFollowing(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newFollowingStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByFollowedByCount orders the results by followed_by count.
func ByFollowedByCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newFollowedByStep(), opts...)
}
}
// ByFollowedBy orders the results by followed_by terms.
func ByFollowedBy(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newFollowedByStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByInvitationsCount orders the results by invitations count.
func ByInvitationsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newInvitationsStep(), opts...)
}
}
// ByInvitations orders the results by invitations terms.
func ByInvitations(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newInvitationsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByInvitedByField orders the results by invited_by field.
func ByInvitedByField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newInvitedByStep(), sql.OrderByField(field, opts...))
}
}
// ByPostsCount orders the results by posts count.
func ByPostsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPostsStep(), opts...)
}
}
// ByPosts orders the results by posts terms.
func ByPosts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByQuestionsCount orders the results by questions count.
func ByQuestionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newQuestionsStep(), opts...)
}
}
// ByQuestions orders the results by questions terms.
func ByQuestions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newQuestionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByReactsCount orders the results by reacts count.
func ByReactsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newReactsStep(), opts...)
}
}
// ByReacts orders the results by reacts terms.
func ByReacts(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newReactsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByLikesCount orders the results by likes count.
func ByLikesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newLikesStep(), opts...)
}
}
// ByLikes orders the results by likes terms.
func ByLikes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newLikesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByMentionsCount orders the results by mentions count.
func ByMentionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newMentionsStep(), opts...)
}
}
// ByMentions orders the results by mentions terms.
func ByMentions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newMentionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByRolesCount orders the results by roles count.
func ByRolesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newRolesStep(), opts...)
}
}
// ByRoles orders the results by roles terms.
func ByRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newRolesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByAuthenticationCount orders the results by authentication count.
func ByAuthenticationCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newAuthenticationStep(), opts...)
}
}
// ByAuthentication orders the results by authentication terms.
func ByAuthentication(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAuthenticationStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByTagsCount orders the results by tags count.
func ByTagsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newTagsStep(), opts...)
}
}
// ByTags orders the results by tags terms.
func ByTags(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newTagsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByCollectionsCount orders the results by collections count.
func ByCollectionsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newCollectionsStep(), opts...)
}
}
// ByCollections orders the results by collections terms.
func ByCollections(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newCollectionsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByNodesCount orders the results by nodes count.
func ByNodesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newNodesStep(), opts...)
}
}
// ByNodes orders the results by nodes terms.
func ByNodes(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newNodesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByAssetsCount orders the results by assets count.
func ByAssetsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newAssetsStep(), opts...)
}
}
// ByAssets orders the results by assets terms.
func ByAssets(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAssetsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByEventsCount orders the results by events count.
func ByEventsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newEventsStep(), opts...)
}
}
// ByEvents orders the results by events terms.
func ByEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newEventsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByPostReadsCount orders the results by post_reads count.
func ByPostReadsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newPostReadsStep(), opts...)
}
}
// ByPostReads orders the results by post_reads terms.
func ByPostReads(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newPostReadsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByReportsCount orders the results by reports count.
func ByReportsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newReportsStep(), opts...)
}
}
// ByReports orders the results by reports terms.
func ByReports(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newReportsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByHandledReportsCount orders the results by handled_reports count.
func ByHandledReportsCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newHandledReportsStep(), opts...)
}
}
// ByHandledReports orders the results by handled_reports terms.
func ByHandledReports(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newHandledReportsStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
// ByAccountRolesCount orders the results by account_roles count.
func ByAccountRolesCount(opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborsCount(s, newAccountRolesStep(), opts...)
}
}
// ByAccountRoles orders the results by account_roles terms.
func ByAccountRoles(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newAccountRolesStep(), append([]sql.OrderTerm{term}, terms...)...)
}
}
func newSessionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(SessionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, SessionsTable, SessionsColumn),
)
}
func newEmailsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(EmailsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EmailsTable, EmailsColumn),
)
}
func newNotificationsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(NotificationsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, NotificationsTable, NotificationsColumn),
)
}
func newTriggeredNotificationsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(TriggeredNotificationsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, TriggeredNotificationsTable, TriggeredNotificationsColumn),
)
}
func newFollowingStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(FollowingInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, FollowingTable, FollowingColumn),
)
}
func newFollowedByStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(FollowedByInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, FollowedByTable, FollowedByColumn),
)
}
func newInvitationsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(InvitationsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, InvitationsTable, InvitationsColumn),
)
}
func newInvitedByStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(InvitedByInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, InvitedByTable, InvitedByColumn),
)
}
func newPostsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PostsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostsTable, PostsColumn),
)
}
func newQuestionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(QuestionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, QuestionsTable, QuestionsColumn),
)
}
func newReactsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(ReactsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, ReactsTable, ReactsColumn),
)
}
func newLikesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(LikesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, LikesTable, LikesColumn),
)
}
func newMentionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(MentionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, MentionsTable, MentionsColumn),
)
}
func newRolesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(RolesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, true, RolesTable, RolesPrimaryKey...),
)
}
func newAuthenticationStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AuthenticationInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, AuthenticationTable, AuthenticationColumn),
)
}
func newTagsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(TagsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2M, false, TagsTable, TagsPrimaryKey...),
)
}
func newCollectionsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(CollectionsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, CollectionsTable, CollectionsColumn),
)
}
func newNodesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(NodesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, NodesTable, NodesColumn),
)
}
func newAssetsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AssetsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, AssetsTable, AssetsColumn),
)
}
func newEventsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(EventsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, EventsTable, EventsColumn),
)
}
func newPostReadsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(PostReadsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, PostReadsTable, PostReadsColumn),
)
}
func newReportsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(ReportsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, ReportsTable, ReportsColumn),
)
}
func newHandledReportsStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(HandledReportsInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, false, HandledReportsTable, HandledReportsColumn),
)
}
func newAccountRolesStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(AccountRolesInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.O2M, true, AccountRolesTable, AccountRolesColumn),
)
}