// Code generated by ent, DO NOT EDIT. package identityadoptiondecision import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" ) const ( // Label holds the string label denoting the identityadoptiondecision type in the database. Label = "identity_adoption_decision" // 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" // FieldPendingAuthSessionID holds the string denoting the pending_auth_session_id field in the database. FieldPendingAuthSessionID = "pending_auth_session_id" // FieldIdentityID holds the string denoting the identity_id field in the database. FieldIdentityID = "identity_id" // FieldAdoptDisplayName holds the string denoting the adopt_display_name field in the database. FieldAdoptDisplayName = "adopt_display_name" // FieldAdoptAvatar holds the string denoting the adopt_avatar field in the database. FieldAdoptAvatar = "adopt_avatar" // FieldDecidedAt holds the string denoting the decided_at field in the database. FieldDecidedAt = "decided_at" // EdgePendingAuthSession holds the string denoting the pending_auth_session edge name in mutations. EdgePendingAuthSession = "pending_auth_session" // EdgeIdentity holds the string denoting the identity edge name in mutations. EdgeIdentity = "identity" // Table holds the table name of the identityadoptiondecision in the database. Table = "identity_adoption_decisions" // PendingAuthSessionTable is the table that holds the pending_auth_session relation/edge. PendingAuthSessionTable = "identity_adoption_decisions" // PendingAuthSessionInverseTable is the table name for the PendingAuthSession entity. // It exists in this package in order to avoid circular dependency with the "pendingauthsession" package. PendingAuthSessionInverseTable = "pending_auth_sessions" // PendingAuthSessionColumn is the table column denoting the pending_auth_session relation/edge. PendingAuthSessionColumn = "pending_auth_session_id" // IdentityTable is the table that holds the identity relation/edge. IdentityTable = "identity_adoption_decisions" // IdentityInverseTable is the table name for the AuthIdentity entity. // It exists in this package in order to avoid circular dependency with the "authidentity" package. IdentityInverseTable = "auth_identities" // IdentityColumn is the table column denoting the identity relation/edge. IdentityColumn = "identity_id" ) // Columns holds all SQL columns for identityadoptiondecision fields. var Columns = []string{ FieldID, FieldCreatedAt, FieldUpdatedAt, FieldPendingAuthSessionID, FieldIdentityID, FieldAdoptDisplayName, FieldAdoptAvatar, FieldDecidedAt, } // 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 // DefaultAdoptDisplayName holds the default value on creation for the "adopt_display_name" field. DefaultAdoptDisplayName bool // DefaultAdoptAvatar holds the default value on creation for the "adopt_avatar" field. DefaultAdoptAvatar bool // DefaultDecidedAt holds the default value on creation for the "decided_at" field. DefaultDecidedAt func() time.Time ) // OrderOption defines the ordering options for the IdentityAdoptionDecision 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() } // ByPendingAuthSessionID orders the results by the pending_auth_session_id field. func ByPendingAuthSessionID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldPendingAuthSessionID, opts...).ToFunc() } // ByIdentityID orders the results by the identity_id field. func ByIdentityID(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldIdentityID, opts...).ToFunc() } // ByAdoptDisplayName orders the results by the adopt_display_name field. func ByAdoptDisplayName(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAdoptDisplayName, opts...).ToFunc() } // ByAdoptAvatar orders the results by the adopt_avatar field. func ByAdoptAvatar(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldAdoptAvatar, opts...).ToFunc() } // ByDecidedAt orders the results by the decided_at field. func ByDecidedAt(opts ...sql.OrderTermOption) OrderOption { return sql.OrderByField(FieldDecidedAt, opts...).ToFunc() } // ByPendingAuthSessionField orders the results by pending_auth_session field. func ByPendingAuthSessionField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newPendingAuthSessionStep(), sql.OrderByField(field, opts...)) } } // ByIdentityField orders the results by identity field. func ByIdentityField(field string, opts ...sql.OrderTermOption) OrderOption { return func(s *sql.Selector) { sqlgraph.OrderByNeighborTerms(s, newIdentityStep(), sql.OrderByField(field, opts...)) } } func newPendingAuthSessionStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(PendingAuthSessionInverseTable, FieldID), sqlgraph.Edge(sqlgraph.O2O, true, PendingAuthSessionTable, PendingAuthSessionColumn), ) } func newIdentityStep() *sqlgraph.Step { return sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.To(IdentityInverseTable, FieldID), sqlgraph.Edge(sqlgraph.M2O, true, IdentityTable, IdentityColumn), ) }