feat: rebuild auth identity foundation flow
This commit is contained in:
209
backend/ent/authidentity/authidentity.go
Normal file
209
backend/ent/authidentity/authidentity.go
Normal file
@@ -0,0 +1,209 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package authidentity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the authidentity type in the database.
|
||||
Label = "auth_identity"
|
||||
// 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"
|
||||
// FieldUserID holds the string denoting the user_id field in the database.
|
||||
FieldUserID = "user_id"
|
||||
// FieldProviderType holds the string denoting the provider_type field in the database.
|
||||
FieldProviderType = "provider_type"
|
||||
// FieldProviderKey holds the string denoting the provider_key field in the database.
|
||||
FieldProviderKey = "provider_key"
|
||||
// FieldProviderSubject holds the string denoting the provider_subject field in the database.
|
||||
FieldProviderSubject = "provider_subject"
|
||||
// FieldVerifiedAt holds the string denoting the verified_at field in the database.
|
||||
FieldVerifiedAt = "verified_at"
|
||||
// FieldIssuer holds the string denoting the issuer field in the database.
|
||||
FieldIssuer = "issuer"
|
||||
// FieldMetadata holds the string denoting the metadata field in the database.
|
||||
FieldMetadata = "metadata"
|
||||
// EdgeUser holds the string denoting the user edge name in mutations.
|
||||
EdgeUser = "user"
|
||||
// EdgeChannels holds the string denoting the channels edge name in mutations.
|
||||
EdgeChannels = "channels"
|
||||
// EdgeAdoptionDecisions holds the string denoting the adoption_decisions edge name in mutations.
|
||||
EdgeAdoptionDecisions = "adoption_decisions"
|
||||
// Table holds the table name of the authidentity in the database.
|
||||
Table = "auth_identities"
|
||||
// UserTable is the table that holds the user relation/edge.
|
||||
UserTable = "auth_identities"
|
||||
// UserInverseTable is the table name for the User entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "user" package.
|
||||
UserInverseTable = "users"
|
||||
// UserColumn is the table column denoting the user relation/edge.
|
||||
UserColumn = "user_id"
|
||||
// ChannelsTable is the table that holds the channels relation/edge.
|
||||
ChannelsTable = "auth_identity_channels"
|
||||
// ChannelsInverseTable is the table name for the AuthIdentityChannel entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "authidentitychannel" package.
|
||||
ChannelsInverseTable = "auth_identity_channels"
|
||||
// ChannelsColumn is the table column denoting the channels relation/edge.
|
||||
ChannelsColumn = "identity_id"
|
||||
// AdoptionDecisionsTable is the table that holds the adoption_decisions relation/edge.
|
||||
AdoptionDecisionsTable = "identity_adoption_decisions"
|
||||
// AdoptionDecisionsInverseTable is the table name for the IdentityAdoptionDecision entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "identityadoptiondecision" package.
|
||||
AdoptionDecisionsInverseTable = "identity_adoption_decisions"
|
||||
// AdoptionDecisionsColumn is the table column denoting the adoption_decisions relation/edge.
|
||||
AdoptionDecisionsColumn = "identity_id"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for authidentity fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
FieldUserID,
|
||||
FieldProviderType,
|
||||
FieldProviderKey,
|
||||
FieldProviderSubject,
|
||||
FieldVerifiedAt,
|
||||
FieldIssuer,
|
||||
FieldMetadata,
|
||||
}
|
||||
|
||||
// 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
|
||||
// ProviderTypeValidator is a validator for the "provider_type" field. It is called by the builders before save.
|
||||
ProviderTypeValidator func(string) error
|
||||
// ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
|
||||
ProviderKeyValidator func(string) error
|
||||
// ProviderSubjectValidator is a validator for the "provider_subject" field. It is called by the builders before save.
|
||||
ProviderSubjectValidator func(string) error
|
||||
// DefaultMetadata holds the default value on creation for the "metadata" field.
|
||||
DefaultMetadata func() map[string]interface{}
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the AuthIdentity 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()
|
||||
}
|
||||
|
||||
// ByUserID orders the results by the user_id field.
|
||||
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUserID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderType orders the results by the provider_type field.
|
||||
func ByProviderType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderKey orders the results by the provider_key field.
|
||||
func ByProviderKey(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderKey, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProviderSubject orders the results by the provider_subject field.
|
||||
func ByProviderSubject(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProviderSubject, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByVerifiedAt orders the results by the verified_at field.
|
||||
func ByVerifiedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldVerifiedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIssuer orders the results by the issuer field.
|
||||
func ByIssuer(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIssuer, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUserField orders the results by user field.
|
||||
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
|
||||
}
|
||||
}
|
||||
|
||||
// ByChannelsCount orders the results by channels count.
|
||||
func ByChannelsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newChannelsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByChannels orders the results by channels terms.
|
||||
func ByChannels(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newChannelsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAdoptionDecisionsCount orders the results by adoption_decisions count.
|
||||
func ByAdoptionDecisionsCount(opts ...sql.OrderTermOption) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborsCount(s, newAdoptionDecisionsStep(), opts...)
|
||||
}
|
||||
}
|
||||
|
||||
// ByAdoptionDecisions orders the results by adoption_decisions terms.
|
||||
func ByAdoptionDecisions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption {
|
||||
return func(s *sql.Selector) {
|
||||
sqlgraph.OrderByNeighborTerms(s, newAdoptionDecisionsStep(), append([]sql.OrderTerm{term}, terms...)...)
|
||||
}
|
||||
}
|
||||
func newUserStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(UserInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
}
|
||||
func newChannelsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(ChannelsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ChannelsTable, ChannelsColumn),
|
||||
)
|
||||
}
|
||||
func newAdoptionDecisionsStep() *sqlgraph.Step {
|
||||
return sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(AdoptionDecisionsInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, AdoptionDecisionsTable, AdoptionDecisionsColumn),
|
||||
)
|
||||
}
|
||||
600
backend/ent/authidentity/where.go
Normal file
600
backend/ent/authidentity/where.go
Normal file
@@ -0,0 +1,600 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package authidentity
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/Wei-Shaw/sub2api/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
|
||||
func UpdatedAt(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
|
||||
func UserID(v int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldUserID, v))
|
||||
}
|
||||
|
||||
// ProviderType applies equality check predicate on the "provider_type" field. It's identical to ProviderTypeEQ.
|
||||
func ProviderType(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderKey applies equality check predicate on the "provider_key" field. It's identical to ProviderKeyEQ.
|
||||
func ProviderKey(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderSubject applies equality check predicate on the "provider_subject" field. It's identical to ProviderSubjectEQ.
|
||||
func ProviderSubject(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// VerifiedAt applies equality check predicate on the "verified_at" field. It's identical to VerifiedAtEQ.
|
||||
func VerifiedAt(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// Issuer applies equality check predicate on the "issuer" field. It's identical to IssuerEQ.
|
||||
func Issuer(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
|
||||
func CreatedAtNEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtIn applies the In predicate on the "created_at" field.
|
||||
func CreatedAtIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
|
||||
func CreatedAtNotIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldCreatedAt, vs...))
|
||||
}
|
||||
|
||||
// CreatedAtGT applies the GT predicate on the "created_at" field.
|
||||
func CreatedAtGT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
|
||||
func CreatedAtGTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLT applies the LT predicate on the "created_at" field.
|
||||
func CreatedAtLT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
|
||||
func CreatedAtLTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldCreatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
|
||||
func UpdatedAtEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
|
||||
func UpdatedAtNEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtIn applies the In predicate on the "updated_at" field.
|
||||
func UpdatedAtIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
|
||||
func UpdatedAtNotIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldUpdatedAt, vs...))
|
||||
}
|
||||
|
||||
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
|
||||
func UpdatedAtGT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
|
||||
func UpdatedAtGTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
|
||||
func UpdatedAtLT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
|
||||
func UpdatedAtLTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldUpdatedAt, v))
|
||||
}
|
||||
|
||||
// UserIDEQ applies the EQ predicate on the "user_id" field.
|
||||
func UserIDEQ(v int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldUserID, v))
|
||||
}
|
||||
|
||||
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
|
||||
func UserIDNEQ(v int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldUserID, v))
|
||||
}
|
||||
|
||||
// UserIDIn applies the In predicate on the "user_id" field.
|
||||
func UserIDIn(vs ...int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldUserID, vs...))
|
||||
}
|
||||
|
||||
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
|
||||
func UserIDNotIn(vs ...int64) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldUserID, vs...))
|
||||
}
|
||||
|
||||
// ProviderTypeEQ applies the EQ predicate on the "provider_type" field.
|
||||
func ProviderTypeEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeNEQ applies the NEQ predicate on the "provider_type" field.
|
||||
func ProviderTypeNEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeIn applies the In predicate on the "provider_type" field.
|
||||
func ProviderTypeIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldProviderType, vs...))
|
||||
}
|
||||
|
||||
// ProviderTypeNotIn applies the NotIn predicate on the "provider_type" field.
|
||||
func ProviderTypeNotIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldProviderType, vs...))
|
||||
}
|
||||
|
||||
// ProviderTypeGT applies the GT predicate on the "provider_type" field.
|
||||
func ProviderTypeGT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeGTE applies the GTE predicate on the "provider_type" field.
|
||||
func ProviderTypeGTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeLT applies the LT predicate on the "provider_type" field.
|
||||
func ProviderTypeLT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeLTE applies the LTE predicate on the "provider_type" field.
|
||||
func ProviderTypeLTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeContains applies the Contains predicate on the "provider_type" field.
|
||||
func ProviderTypeContains(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContains(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeHasPrefix applies the HasPrefix predicate on the "provider_type" field.
|
||||
func ProviderTypeHasPrefix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasPrefix(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeHasSuffix applies the HasSuffix predicate on the "provider_type" field.
|
||||
func ProviderTypeHasSuffix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasSuffix(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeEqualFold applies the EqualFold predicate on the "provider_type" field.
|
||||
func ProviderTypeEqualFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEqualFold(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderTypeContainsFold applies the ContainsFold predicate on the "provider_type" field.
|
||||
func ProviderTypeContainsFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContainsFold(FieldProviderType, v))
|
||||
}
|
||||
|
||||
// ProviderKeyEQ applies the EQ predicate on the "provider_key" field.
|
||||
func ProviderKeyEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyNEQ applies the NEQ predicate on the "provider_key" field.
|
||||
func ProviderKeyNEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyIn applies the In predicate on the "provider_key" field.
|
||||
func ProviderKeyIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldProviderKey, vs...))
|
||||
}
|
||||
|
||||
// ProviderKeyNotIn applies the NotIn predicate on the "provider_key" field.
|
||||
func ProviderKeyNotIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldProviderKey, vs...))
|
||||
}
|
||||
|
||||
// ProviderKeyGT applies the GT predicate on the "provider_key" field.
|
||||
func ProviderKeyGT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyGTE applies the GTE predicate on the "provider_key" field.
|
||||
func ProviderKeyGTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyLT applies the LT predicate on the "provider_key" field.
|
||||
func ProviderKeyLT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyLTE applies the LTE predicate on the "provider_key" field.
|
||||
func ProviderKeyLTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyContains applies the Contains predicate on the "provider_key" field.
|
||||
func ProviderKeyContains(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContains(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyHasPrefix applies the HasPrefix predicate on the "provider_key" field.
|
||||
func ProviderKeyHasPrefix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasPrefix(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyHasSuffix applies the HasSuffix predicate on the "provider_key" field.
|
||||
func ProviderKeyHasSuffix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasSuffix(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyEqualFold applies the EqualFold predicate on the "provider_key" field.
|
||||
func ProviderKeyEqualFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEqualFold(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderKeyContainsFold applies the ContainsFold predicate on the "provider_key" field.
|
||||
func ProviderKeyContainsFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContainsFold(FieldProviderKey, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectEQ applies the EQ predicate on the "provider_subject" field.
|
||||
func ProviderSubjectEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectNEQ applies the NEQ predicate on the "provider_subject" field.
|
||||
func ProviderSubjectNEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectIn applies the In predicate on the "provider_subject" field.
|
||||
func ProviderSubjectIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldProviderSubject, vs...))
|
||||
}
|
||||
|
||||
// ProviderSubjectNotIn applies the NotIn predicate on the "provider_subject" field.
|
||||
func ProviderSubjectNotIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldProviderSubject, vs...))
|
||||
}
|
||||
|
||||
// ProviderSubjectGT applies the GT predicate on the "provider_subject" field.
|
||||
func ProviderSubjectGT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectGTE applies the GTE predicate on the "provider_subject" field.
|
||||
func ProviderSubjectGTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectLT applies the LT predicate on the "provider_subject" field.
|
||||
func ProviderSubjectLT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectLTE applies the LTE predicate on the "provider_subject" field.
|
||||
func ProviderSubjectLTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectContains applies the Contains predicate on the "provider_subject" field.
|
||||
func ProviderSubjectContains(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContains(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectHasPrefix applies the HasPrefix predicate on the "provider_subject" field.
|
||||
func ProviderSubjectHasPrefix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasPrefix(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectHasSuffix applies the HasSuffix predicate on the "provider_subject" field.
|
||||
func ProviderSubjectHasSuffix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasSuffix(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectEqualFold applies the EqualFold predicate on the "provider_subject" field.
|
||||
func ProviderSubjectEqualFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEqualFold(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// ProviderSubjectContainsFold applies the ContainsFold predicate on the "provider_subject" field.
|
||||
func ProviderSubjectContainsFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContainsFold(FieldProviderSubject, v))
|
||||
}
|
||||
|
||||
// VerifiedAtEQ applies the EQ predicate on the "verified_at" field.
|
||||
func VerifiedAtEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtNEQ applies the NEQ predicate on the "verified_at" field.
|
||||
func VerifiedAtNEQ(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtIn applies the In predicate on the "verified_at" field.
|
||||
func VerifiedAtIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldVerifiedAt, vs...))
|
||||
}
|
||||
|
||||
// VerifiedAtNotIn applies the NotIn predicate on the "verified_at" field.
|
||||
func VerifiedAtNotIn(vs ...time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldVerifiedAt, vs...))
|
||||
}
|
||||
|
||||
// VerifiedAtGT applies the GT predicate on the "verified_at" field.
|
||||
func VerifiedAtGT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtGTE applies the GTE predicate on the "verified_at" field.
|
||||
func VerifiedAtGTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtLT applies the LT predicate on the "verified_at" field.
|
||||
func VerifiedAtLT(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtLTE applies the LTE predicate on the "verified_at" field.
|
||||
func VerifiedAtLTE(v time.Time) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldVerifiedAt, v))
|
||||
}
|
||||
|
||||
// VerifiedAtIsNil applies the IsNil predicate on the "verified_at" field.
|
||||
func VerifiedAtIsNil() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIsNull(FieldVerifiedAt))
|
||||
}
|
||||
|
||||
// VerifiedAtNotNil applies the NotNil predicate on the "verified_at" field.
|
||||
func VerifiedAtNotNil() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotNull(FieldVerifiedAt))
|
||||
}
|
||||
|
||||
// IssuerEQ applies the EQ predicate on the "issuer" field.
|
||||
func IssuerEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEQ(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerNEQ applies the NEQ predicate on the "issuer" field.
|
||||
func IssuerNEQ(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNEQ(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerIn applies the In predicate on the "issuer" field.
|
||||
func IssuerIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIn(FieldIssuer, vs...))
|
||||
}
|
||||
|
||||
// IssuerNotIn applies the NotIn predicate on the "issuer" field.
|
||||
func IssuerNotIn(vs ...string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotIn(FieldIssuer, vs...))
|
||||
}
|
||||
|
||||
// IssuerGT applies the GT predicate on the "issuer" field.
|
||||
func IssuerGT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGT(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerGTE applies the GTE predicate on the "issuer" field.
|
||||
func IssuerGTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldGTE(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerLT applies the LT predicate on the "issuer" field.
|
||||
func IssuerLT(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLT(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerLTE applies the LTE predicate on the "issuer" field.
|
||||
func IssuerLTE(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldLTE(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerContains applies the Contains predicate on the "issuer" field.
|
||||
func IssuerContains(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContains(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerHasPrefix applies the HasPrefix predicate on the "issuer" field.
|
||||
func IssuerHasPrefix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasPrefix(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerHasSuffix applies the HasSuffix predicate on the "issuer" field.
|
||||
func IssuerHasSuffix(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldHasSuffix(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerIsNil applies the IsNil predicate on the "issuer" field.
|
||||
func IssuerIsNil() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldIsNull(FieldIssuer))
|
||||
}
|
||||
|
||||
// IssuerNotNil applies the NotNil predicate on the "issuer" field.
|
||||
func IssuerNotNil() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldNotNull(FieldIssuer))
|
||||
}
|
||||
|
||||
// IssuerEqualFold applies the EqualFold predicate on the "issuer" field.
|
||||
func IssuerEqualFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldEqualFold(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// IssuerContainsFold applies the ContainsFold predicate on the "issuer" field.
|
||||
func IssuerContainsFold(v string) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.FieldContainsFold(FieldIssuer, v))
|
||||
}
|
||||
|
||||
// HasUser applies the HasEdge predicate on the "user" edge.
|
||||
func HasUser() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
|
||||
func HasUserWith(preds ...predicate.User) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := newUserStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasChannels applies the HasEdge predicate on the "channels" edge.
|
||||
func HasChannels() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, ChannelsTable, ChannelsColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasChannelsWith applies the HasEdge predicate on the "channels" edge with a given conditions (other predicates).
|
||||
func HasChannelsWith(preds ...predicate.AuthIdentityChannel) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := newChannelsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasAdoptionDecisions applies the HasEdge predicate on the "adoption_decisions" edge.
|
||||
func HasAdoptionDecisions() predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, AdoptionDecisionsTable, AdoptionDecisionsColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasAdoptionDecisionsWith applies the HasEdge predicate on the "adoption_decisions" edge with a given conditions (other predicates).
|
||||
func HasAdoptionDecisionsWith(preds ...predicate.IdentityAdoptionDecision) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(func(s *sql.Selector) {
|
||||
step := newAdoptionDecisionsStep()
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.AuthIdentity) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.AuthIdentity) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.AuthIdentity) predicate.AuthIdentity {
|
||||
return predicate.AuthIdentity(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user