757 lines
29 KiB
Go
757 lines
29 KiB
Go
// Code generated by ent, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"schisandra-album-cloud-microservices/common/ent/predicate"
|
|
"schisandra-album-cloud-microservices/common/ent/scaauthpermissionrule"
|
|
"schisandra-album-cloud-microservices/common/ent/scaauthrole"
|
|
"schisandra-album-cloud-microservices/common/ent/scaauthuser"
|
|
"schisandra-album-cloud-microservices/common/ent/scaauthuserdevice"
|
|
"schisandra-album-cloud-microservices/common/ent/scaauthusersocial"
|
|
|
|
"entgo.io/ent/dialect/sql"
|
|
"entgo.io/ent/dialect/sql/sqlgraph"
|
|
"entgo.io/ent/entql"
|
|
"entgo.io/ent/schema/field"
|
|
)
|
|
|
|
// schemaGraph holds a representation of ent/schema at runtime.
|
|
var schemaGraph = func() *sqlgraph.Schema {
|
|
graph := &sqlgraph.Schema{Nodes: make([]*sqlgraph.Node, 5)}
|
|
graph.Nodes[0] = &sqlgraph.Node{
|
|
NodeSpec: sqlgraph.NodeSpec{
|
|
Table: scaauthpermissionrule.Table,
|
|
Columns: scaauthpermissionrule.Columns,
|
|
ID: &sqlgraph.FieldSpec{
|
|
Type: field.TypeInt64,
|
|
Column: scaauthpermissionrule.FieldID,
|
|
},
|
|
},
|
|
Type: "ScaAuthPermissionRule",
|
|
Fields: map[string]*sqlgraph.FieldSpec{
|
|
scaauthpermissionrule.FieldPtype: {Type: field.TypeString, Column: scaauthpermissionrule.FieldPtype},
|
|
scaauthpermissionrule.FieldV0: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV0},
|
|
scaauthpermissionrule.FieldV1: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV1},
|
|
scaauthpermissionrule.FieldV2: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV2},
|
|
scaauthpermissionrule.FieldV3: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV3},
|
|
scaauthpermissionrule.FieldV4: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV4},
|
|
scaauthpermissionrule.FieldV5: {Type: field.TypeString, Column: scaauthpermissionrule.FieldV5},
|
|
},
|
|
}
|
|
graph.Nodes[1] = &sqlgraph.Node{
|
|
NodeSpec: sqlgraph.NodeSpec{
|
|
Table: scaauthrole.Table,
|
|
Columns: scaauthrole.Columns,
|
|
ID: &sqlgraph.FieldSpec{
|
|
Type: field.TypeInt64,
|
|
Column: scaauthrole.FieldID,
|
|
},
|
|
},
|
|
Type: "ScaAuthRole",
|
|
Fields: map[string]*sqlgraph.FieldSpec{
|
|
scaauthrole.FieldCreatedAt: {Type: field.TypeTime, Column: scaauthrole.FieldCreatedAt},
|
|
scaauthrole.FieldUpdatedAt: {Type: field.TypeTime, Column: scaauthrole.FieldUpdatedAt},
|
|
scaauthrole.FieldDeleted: {Type: field.TypeInt8, Column: scaauthrole.FieldDeleted},
|
|
scaauthrole.FieldRoleName: {Type: field.TypeString, Column: scaauthrole.FieldRoleName},
|
|
scaauthrole.FieldRoleKey: {Type: field.TypeString, Column: scaauthrole.FieldRoleKey},
|
|
},
|
|
}
|
|
graph.Nodes[2] = &sqlgraph.Node{
|
|
NodeSpec: sqlgraph.NodeSpec{
|
|
Table: scaauthuser.Table,
|
|
Columns: scaauthuser.Columns,
|
|
ID: &sqlgraph.FieldSpec{
|
|
Type: field.TypeInt64,
|
|
Column: scaauthuser.FieldID,
|
|
},
|
|
},
|
|
Type: "ScaAuthUser",
|
|
Fields: map[string]*sqlgraph.FieldSpec{
|
|
scaauthuser.FieldCreatedAt: {Type: field.TypeTime, Column: scaauthuser.FieldCreatedAt},
|
|
scaauthuser.FieldUpdatedAt: {Type: field.TypeTime, Column: scaauthuser.FieldUpdatedAt},
|
|
scaauthuser.FieldDeleted: {Type: field.TypeInt8, Column: scaauthuser.FieldDeleted},
|
|
scaauthuser.FieldUID: {Type: field.TypeString, Column: scaauthuser.FieldUID},
|
|
scaauthuser.FieldUsername: {Type: field.TypeString, Column: scaauthuser.FieldUsername},
|
|
scaauthuser.FieldNickname: {Type: field.TypeString, Column: scaauthuser.FieldNickname},
|
|
scaauthuser.FieldEmail: {Type: field.TypeString, Column: scaauthuser.FieldEmail},
|
|
scaauthuser.FieldPhone: {Type: field.TypeString, Column: scaauthuser.FieldPhone},
|
|
scaauthuser.FieldPassword: {Type: field.TypeString, Column: scaauthuser.FieldPassword},
|
|
scaauthuser.FieldGender: {Type: field.TypeString, Column: scaauthuser.FieldGender},
|
|
scaauthuser.FieldAvatar: {Type: field.TypeString, Column: scaauthuser.FieldAvatar},
|
|
scaauthuser.FieldStatus: {Type: field.TypeInt8, Column: scaauthuser.FieldStatus},
|
|
scaauthuser.FieldIntroduce: {Type: field.TypeString, Column: scaauthuser.FieldIntroduce},
|
|
scaauthuser.FieldBlog: {Type: field.TypeString, Column: scaauthuser.FieldBlog},
|
|
scaauthuser.FieldLocation: {Type: field.TypeString, Column: scaauthuser.FieldLocation},
|
|
scaauthuser.FieldCompany: {Type: field.TypeString, Column: scaauthuser.FieldCompany},
|
|
},
|
|
}
|
|
graph.Nodes[3] = &sqlgraph.Node{
|
|
NodeSpec: sqlgraph.NodeSpec{
|
|
Table: scaauthuserdevice.Table,
|
|
Columns: scaauthuserdevice.Columns,
|
|
ID: &sqlgraph.FieldSpec{
|
|
Type: field.TypeInt64,
|
|
Column: scaauthuserdevice.FieldID,
|
|
},
|
|
},
|
|
Type: "ScaAuthUserDevice",
|
|
Fields: map[string]*sqlgraph.FieldSpec{
|
|
scaauthuserdevice.FieldCreatedAt: {Type: field.TypeTime, Column: scaauthuserdevice.FieldCreatedAt},
|
|
scaauthuserdevice.FieldUpdatedAt: {Type: field.TypeTime, Column: scaauthuserdevice.FieldUpdatedAt},
|
|
scaauthuserdevice.FieldDeleted: {Type: field.TypeInt8, Column: scaauthuserdevice.FieldDeleted},
|
|
scaauthuserdevice.FieldUserID: {Type: field.TypeString, Column: scaauthuserdevice.FieldUserID},
|
|
scaauthuserdevice.FieldIP: {Type: field.TypeString, Column: scaauthuserdevice.FieldIP},
|
|
scaauthuserdevice.FieldLocation: {Type: field.TypeString, Column: scaauthuserdevice.FieldLocation},
|
|
scaauthuserdevice.FieldAgent: {Type: field.TypeString, Column: scaauthuserdevice.FieldAgent},
|
|
scaauthuserdevice.FieldBrowser: {Type: field.TypeString, Column: scaauthuserdevice.FieldBrowser},
|
|
scaauthuserdevice.FieldOperatingSystem: {Type: field.TypeString, Column: scaauthuserdevice.FieldOperatingSystem},
|
|
scaauthuserdevice.FieldBrowserVersion: {Type: field.TypeString, Column: scaauthuserdevice.FieldBrowserVersion},
|
|
scaauthuserdevice.FieldMobile: {Type: field.TypeInt, Column: scaauthuserdevice.FieldMobile},
|
|
scaauthuserdevice.FieldBot: {Type: field.TypeInt, Column: scaauthuserdevice.FieldBot},
|
|
scaauthuserdevice.FieldMozilla: {Type: field.TypeString, Column: scaauthuserdevice.FieldMozilla},
|
|
scaauthuserdevice.FieldPlatform: {Type: field.TypeString, Column: scaauthuserdevice.FieldPlatform},
|
|
scaauthuserdevice.FieldEngineName: {Type: field.TypeString, Column: scaauthuserdevice.FieldEngineName},
|
|
scaauthuserdevice.FieldEngineVersion: {Type: field.TypeString, Column: scaauthuserdevice.FieldEngineVersion},
|
|
},
|
|
}
|
|
graph.Nodes[4] = &sqlgraph.Node{
|
|
NodeSpec: sqlgraph.NodeSpec{
|
|
Table: scaauthusersocial.Table,
|
|
Columns: scaauthusersocial.Columns,
|
|
ID: &sqlgraph.FieldSpec{
|
|
Type: field.TypeInt64,
|
|
Column: scaauthusersocial.FieldID,
|
|
},
|
|
},
|
|
Type: "ScaAuthUserSocial",
|
|
Fields: map[string]*sqlgraph.FieldSpec{
|
|
scaauthusersocial.FieldCreatedAt: {Type: field.TypeTime, Column: scaauthusersocial.FieldCreatedAt},
|
|
scaauthusersocial.FieldUpdatedAt: {Type: field.TypeTime, Column: scaauthusersocial.FieldUpdatedAt},
|
|
scaauthusersocial.FieldDeleted: {Type: field.TypeInt8, Column: scaauthusersocial.FieldDeleted},
|
|
scaauthusersocial.FieldUserID: {Type: field.TypeString, Column: scaauthusersocial.FieldUserID},
|
|
scaauthusersocial.FieldOpenID: {Type: field.TypeString, Column: scaauthusersocial.FieldOpenID},
|
|
scaauthusersocial.FieldSource: {Type: field.TypeString, Column: scaauthusersocial.FieldSource},
|
|
scaauthusersocial.FieldStatus: {Type: field.TypeInt, Column: scaauthusersocial.FieldStatus},
|
|
},
|
|
}
|
|
graph.MustAddE(
|
|
"sca_auth_role",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: scaauthpermissionrule.ScaAuthRoleTable,
|
|
Columns: []string{scaauthpermissionrule.ScaAuthRoleColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthPermissionRule",
|
|
"ScaAuthRole",
|
|
)
|
|
graph.MustAddE(
|
|
"sca_auth_permission_rule",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Table: scaauthrole.ScaAuthPermissionRuleTable,
|
|
Columns: []string{scaauthrole.ScaAuthPermissionRuleColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthRole",
|
|
"ScaAuthPermissionRule",
|
|
)
|
|
graph.MustAddE(
|
|
"sca_auth_user_social",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Table: scaauthuser.ScaAuthUserSocialTable,
|
|
Columns: []string{scaauthuser.ScaAuthUserSocialColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthUser",
|
|
"ScaAuthUserSocial",
|
|
)
|
|
graph.MustAddE(
|
|
"sca_auth_user_device",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Table: scaauthuser.ScaAuthUserDeviceTable,
|
|
Columns: []string{scaauthuser.ScaAuthUserDeviceColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthUser",
|
|
"ScaAuthUserDevice",
|
|
)
|
|
graph.MustAddE(
|
|
"sca_auth_user",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: scaauthuserdevice.ScaAuthUserTable,
|
|
Columns: []string{scaauthuserdevice.ScaAuthUserColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthUserDevice",
|
|
"ScaAuthUser",
|
|
)
|
|
graph.MustAddE(
|
|
"sca_auth_user",
|
|
&sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.M2O,
|
|
Inverse: true,
|
|
Table: scaauthusersocial.ScaAuthUserTable,
|
|
Columns: []string{scaauthusersocial.ScaAuthUserColumn},
|
|
Bidi: false,
|
|
},
|
|
"ScaAuthUserSocial",
|
|
"ScaAuthUser",
|
|
)
|
|
return graph
|
|
}()
|
|
|
|
// predicateAdder wraps the addPredicate method.
|
|
// All update, update-one and query builders implement this interface.
|
|
type predicateAdder interface {
|
|
addPredicate(func(s *sql.Selector))
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (saprq *ScaAuthPermissionRuleQuery) addPredicate(pred func(s *sql.Selector)) {
|
|
saprq.predicates = append(saprq.predicates, pred)
|
|
}
|
|
|
|
// Filter returns a Filter implementation to apply filters on the ScaAuthPermissionRuleQuery builder.
|
|
func (saprq *ScaAuthPermissionRuleQuery) Filter() *ScaAuthPermissionRuleFilter {
|
|
return &ScaAuthPermissionRuleFilter{config: saprq.config, predicateAdder: saprq}
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (m *ScaAuthPermissionRuleMutation) addPredicate(pred func(s *sql.Selector)) {
|
|
m.predicates = append(m.predicates, pred)
|
|
}
|
|
|
|
// Filter returns an entql.Where implementation to apply filters on the ScaAuthPermissionRuleMutation builder.
|
|
func (m *ScaAuthPermissionRuleMutation) Filter() *ScaAuthPermissionRuleFilter {
|
|
return &ScaAuthPermissionRuleFilter{config: m.config, predicateAdder: m}
|
|
}
|
|
|
|
// ScaAuthPermissionRuleFilter provides a generic filtering capability at runtime for ScaAuthPermissionRuleQuery.
|
|
type ScaAuthPermissionRuleFilter struct {
|
|
predicateAdder
|
|
config
|
|
}
|
|
|
|
// Where applies the entql predicate on the query filter.
|
|
func (f *ScaAuthPermissionRuleFilter) Where(p entql.P) {
|
|
f.addPredicate(func(s *sql.Selector) {
|
|
if err := schemaGraph.EvalP(schemaGraph.Nodes[0].Type, p, s); err != nil {
|
|
s.AddError(err)
|
|
}
|
|
})
|
|
}
|
|
|
|
// WhereID applies the entql int64 predicate on the id field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereID(p entql.Int64P) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldID))
|
|
}
|
|
|
|
// WherePtype applies the entql string predicate on the ptype field.
|
|
func (f *ScaAuthPermissionRuleFilter) WherePtype(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldPtype))
|
|
}
|
|
|
|
// WhereV0 applies the entql string predicate on the v0 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV0(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV0))
|
|
}
|
|
|
|
// WhereV1 applies the entql string predicate on the v1 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV1(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV1))
|
|
}
|
|
|
|
// WhereV2 applies the entql string predicate on the v2 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV2(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV2))
|
|
}
|
|
|
|
// WhereV3 applies the entql string predicate on the v3 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV3(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV3))
|
|
}
|
|
|
|
// WhereV4 applies the entql string predicate on the v4 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV4(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV4))
|
|
}
|
|
|
|
// WhereV5 applies the entql string predicate on the v5 field.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereV5(p entql.StringP) {
|
|
f.Where(p.Field(scaauthpermissionrule.FieldV5))
|
|
}
|
|
|
|
// WhereHasScaAuthRole applies a predicate to check if query has an edge sca_auth_role.
|
|
func (f *ScaAuthPermissionRuleFilter) WhereHasScaAuthRole() {
|
|
f.Where(entql.HasEdge("sca_auth_role"))
|
|
}
|
|
|
|
// WhereHasScaAuthRoleWith applies a predicate to check if query has an edge sca_auth_role with a given conditions (other predicates).
|
|
func (f *ScaAuthPermissionRuleFilter) WhereHasScaAuthRoleWith(preds ...predicate.ScaAuthRole) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_role", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (sarq *ScaAuthRoleQuery) addPredicate(pred func(s *sql.Selector)) {
|
|
sarq.predicates = append(sarq.predicates, pred)
|
|
}
|
|
|
|
// Filter returns a Filter implementation to apply filters on the ScaAuthRoleQuery builder.
|
|
func (sarq *ScaAuthRoleQuery) Filter() *ScaAuthRoleFilter {
|
|
return &ScaAuthRoleFilter{config: sarq.config, predicateAdder: sarq}
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (m *ScaAuthRoleMutation) addPredicate(pred func(s *sql.Selector)) {
|
|
m.predicates = append(m.predicates, pred)
|
|
}
|
|
|
|
// Filter returns an entql.Where implementation to apply filters on the ScaAuthRoleMutation builder.
|
|
func (m *ScaAuthRoleMutation) Filter() *ScaAuthRoleFilter {
|
|
return &ScaAuthRoleFilter{config: m.config, predicateAdder: m}
|
|
}
|
|
|
|
// ScaAuthRoleFilter provides a generic filtering capability at runtime for ScaAuthRoleQuery.
|
|
type ScaAuthRoleFilter struct {
|
|
predicateAdder
|
|
config
|
|
}
|
|
|
|
// Where applies the entql predicate on the query filter.
|
|
func (f *ScaAuthRoleFilter) Where(p entql.P) {
|
|
f.addPredicate(func(s *sql.Selector) {
|
|
if err := schemaGraph.EvalP(schemaGraph.Nodes[1].Type, p, s); err != nil {
|
|
s.AddError(err)
|
|
}
|
|
})
|
|
}
|
|
|
|
// WhereID applies the entql int64 predicate on the id field.
|
|
func (f *ScaAuthRoleFilter) WhereID(p entql.Int64P) {
|
|
f.Where(p.Field(scaauthrole.FieldID))
|
|
}
|
|
|
|
// WhereCreatedAt applies the entql time.Time predicate on the created_at field.
|
|
func (f *ScaAuthRoleFilter) WhereCreatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthrole.FieldCreatedAt))
|
|
}
|
|
|
|
// WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
|
|
func (f *ScaAuthRoleFilter) WhereUpdatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthrole.FieldUpdatedAt))
|
|
}
|
|
|
|
// WhereDeleted applies the entql int8 predicate on the deleted field.
|
|
func (f *ScaAuthRoleFilter) WhereDeleted(p entql.Int8P) {
|
|
f.Where(p.Field(scaauthrole.FieldDeleted))
|
|
}
|
|
|
|
// WhereRoleName applies the entql string predicate on the role_name field.
|
|
func (f *ScaAuthRoleFilter) WhereRoleName(p entql.StringP) {
|
|
f.Where(p.Field(scaauthrole.FieldRoleName))
|
|
}
|
|
|
|
// WhereRoleKey applies the entql string predicate on the role_key field.
|
|
func (f *ScaAuthRoleFilter) WhereRoleKey(p entql.StringP) {
|
|
f.Where(p.Field(scaauthrole.FieldRoleKey))
|
|
}
|
|
|
|
// WhereHasScaAuthPermissionRule applies a predicate to check if query has an edge sca_auth_permission_rule.
|
|
func (f *ScaAuthRoleFilter) WhereHasScaAuthPermissionRule() {
|
|
f.Where(entql.HasEdge("sca_auth_permission_rule"))
|
|
}
|
|
|
|
// WhereHasScaAuthPermissionRuleWith applies a predicate to check if query has an edge sca_auth_permission_rule with a given conditions (other predicates).
|
|
func (f *ScaAuthRoleFilter) WhereHasScaAuthPermissionRuleWith(preds ...predicate.ScaAuthPermissionRule) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_permission_rule", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (sauq *ScaAuthUserQuery) addPredicate(pred func(s *sql.Selector)) {
|
|
sauq.predicates = append(sauq.predicates, pred)
|
|
}
|
|
|
|
// Filter returns a Filter implementation to apply filters on the ScaAuthUserQuery builder.
|
|
func (sauq *ScaAuthUserQuery) Filter() *ScaAuthUserFilter {
|
|
return &ScaAuthUserFilter{config: sauq.config, predicateAdder: sauq}
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (m *ScaAuthUserMutation) addPredicate(pred func(s *sql.Selector)) {
|
|
m.predicates = append(m.predicates, pred)
|
|
}
|
|
|
|
// Filter returns an entql.Where implementation to apply filters on the ScaAuthUserMutation builder.
|
|
func (m *ScaAuthUserMutation) Filter() *ScaAuthUserFilter {
|
|
return &ScaAuthUserFilter{config: m.config, predicateAdder: m}
|
|
}
|
|
|
|
// ScaAuthUserFilter provides a generic filtering capability at runtime for ScaAuthUserQuery.
|
|
type ScaAuthUserFilter struct {
|
|
predicateAdder
|
|
config
|
|
}
|
|
|
|
// Where applies the entql predicate on the query filter.
|
|
func (f *ScaAuthUserFilter) Where(p entql.P) {
|
|
f.addPredicate(func(s *sql.Selector) {
|
|
if err := schemaGraph.EvalP(schemaGraph.Nodes[2].Type, p, s); err != nil {
|
|
s.AddError(err)
|
|
}
|
|
})
|
|
}
|
|
|
|
// WhereID applies the entql int64 predicate on the id field.
|
|
func (f *ScaAuthUserFilter) WhereID(p entql.Int64P) {
|
|
f.Where(p.Field(scaauthuser.FieldID))
|
|
}
|
|
|
|
// WhereCreatedAt applies the entql time.Time predicate on the created_at field.
|
|
func (f *ScaAuthUserFilter) WhereCreatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthuser.FieldCreatedAt))
|
|
}
|
|
|
|
// WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
|
|
func (f *ScaAuthUserFilter) WhereUpdatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthuser.FieldUpdatedAt))
|
|
}
|
|
|
|
// WhereDeleted applies the entql int8 predicate on the deleted field.
|
|
func (f *ScaAuthUserFilter) WhereDeleted(p entql.Int8P) {
|
|
f.Where(p.Field(scaauthuser.FieldDeleted))
|
|
}
|
|
|
|
// WhereUID applies the entql string predicate on the uid field.
|
|
func (f *ScaAuthUserFilter) WhereUID(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldUID))
|
|
}
|
|
|
|
// WhereUsername applies the entql string predicate on the username field.
|
|
func (f *ScaAuthUserFilter) WhereUsername(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldUsername))
|
|
}
|
|
|
|
// WhereNickname applies the entql string predicate on the nickname field.
|
|
func (f *ScaAuthUserFilter) WhereNickname(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldNickname))
|
|
}
|
|
|
|
// WhereEmail applies the entql string predicate on the email field.
|
|
func (f *ScaAuthUserFilter) WhereEmail(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldEmail))
|
|
}
|
|
|
|
// WherePhone applies the entql string predicate on the phone field.
|
|
func (f *ScaAuthUserFilter) WherePhone(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldPhone))
|
|
}
|
|
|
|
// WherePassword applies the entql string predicate on the password field.
|
|
func (f *ScaAuthUserFilter) WherePassword(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldPassword))
|
|
}
|
|
|
|
// WhereGender applies the entql string predicate on the gender field.
|
|
func (f *ScaAuthUserFilter) WhereGender(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldGender))
|
|
}
|
|
|
|
// WhereAvatar applies the entql string predicate on the avatar field.
|
|
func (f *ScaAuthUserFilter) WhereAvatar(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldAvatar))
|
|
}
|
|
|
|
// WhereStatus applies the entql int8 predicate on the status field.
|
|
func (f *ScaAuthUserFilter) WhereStatus(p entql.Int8P) {
|
|
f.Where(p.Field(scaauthuser.FieldStatus))
|
|
}
|
|
|
|
// WhereIntroduce applies the entql string predicate on the introduce field.
|
|
func (f *ScaAuthUserFilter) WhereIntroduce(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldIntroduce))
|
|
}
|
|
|
|
// WhereBlog applies the entql string predicate on the blog field.
|
|
func (f *ScaAuthUserFilter) WhereBlog(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldBlog))
|
|
}
|
|
|
|
// WhereLocation applies the entql string predicate on the location field.
|
|
func (f *ScaAuthUserFilter) WhereLocation(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldLocation))
|
|
}
|
|
|
|
// WhereCompany applies the entql string predicate on the company field.
|
|
func (f *ScaAuthUserFilter) WhereCompany(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuser.FieldCompany))
|
|
}
|
|
|
|
// WhereHasScaAuthUserSocial applies a predicate to check if query has an edge sca_auth_user_social.
|
|
func (f *ScaAuthUserFilter) WhereHasScaAuthUserSocial() {
|
|
f.Where(entql.HasEdge("sca_auth_user_social"))
|
|
}
|
|
|
|
// WhereHasScaAuthUserSocialWith applies a predicate to check if query has an edge sca_auth_user_social with a given conditions (other predicates).
|
|
func (f *ScaAuthUserFilter) WhereHasScaAuthUserSocialWith(preds ...predicate.ScaAuthUserSocial) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_user_social", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|
|
|
|
// WhereHasScaAuthUserDevice applies a predicate to check if query has an edge sca_auth_user_device.
|
|
func (f *ScaAuthUserFilter) WhereHasScaAuthUserDevice() {
|
|
f.Where(entql.HasEdge("sca_auth_user_device"))
|
|
}
|
|
|
|
// WhereHasScaAuthUserDeviceWith applies a predicate to check if query has an edge sca_auth_user_device with a given conditions (other predicates).
|
|
func (f *ScaAuthUserFilter) WhereHasScaAuthUserDeviceWith(preds ...predicate.ScaAuthUserDevice) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_user_device", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (saudq *ScaAuthUserDeviceQuery) addPredicate(pred func(s *sql.Selector)) {
|
|
saudq.predicates = append(saudq.predicates, pred)
|
|
}
|
|
|
|
// Filter returns a Filter implementation to apply filters on the ScaAuthUserDeviceQuery builder.
|
|
func (saudq *ScaAuthUserDeviceQuery) Filter() *ScaAuthUserDeviceFilter {
|
|
return &ScaAuthUserDeviceFilter{config: saudq.config, predicateAdder: saudq}
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (m *ScaAuthUserDeviceMutation) addPredicate(pred func(s *sql.Selector)) {
|
|
m.predicates = append(m.predicates, pred)
|
|
}
|
|
|
|
// Filter returns an entql.Where implementation to apply filters on the ScaAuthUserDeviceMutation builder.
|
|
func (m *ScaAuthUserDeviceMutation) Filter() *ScaAuthUserDeviceFilter {
|
|
return &ScaAuthUserDeviceFilter{config: m.config, predicateAdder: m}
|
|
}
|
|
|
|
// ScaAuthUserDeviceFilter provides a generic filtering capability at runtime for ScaAuthUserDeviceQuery.
|
|
type ScaAuthUserDeviceFilter struct {
|
|
predicateAdder
|
|
config
|
|
}
|
|
|
|
// Where applies the entql predicate on the query filter.
|
|
func (f *ScaAuthUserDeviceFilter) Where(p entql.P) {
|
|
f.addPredicate(func(s *sql.Selector) {
|
|
if err := schemaGraph.EvalP(schemaGraph.Nodes[3].Type, p, s); err != nil {
|
|
s.AddError(err)
|
|
}
|
|
})
|
|
}
|
|
|
|
// WhereID applies the entql int64 predicate on the id field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereID(p entql.Int64P) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldID))
|
|
}
|
|
|
|
// WhereCreatedAt applies the entql time.Time predicate on the created_at field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereCreatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldCreatedAt))
|
|
}
|
|
|
|
// WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereUpdatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldUpdatedAt))
|
|
}
|
|
|
|
// WhereDeleted applies the entql int8 predicate on the deleted field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereDeleted(p entql.Int8P) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldDeleted))
|
|
}
|
|
|
|
// WhereUserID applies the entql string predicate on the user_id field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereUserID(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldUserID))
|
|
}
|
|
|
|
// WhereIP applies the entql string predicate on the ip field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereIP(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldIP))
|
|
}
|
|
|
|
// WhereLocation applies the entql string predicate on the location field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereLocation(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldLocation))
|
|
}
|
|
|
|
// WhereAgent applies the entql string predicate on the agent field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereAgent(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldAgent))
|
|
}
|
|
|
|
// WhereBrowser applies the entql string predicate on the browser field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereBrowser(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldBrowser))
|
|
}
|
|
|
|
// WhereOperatingSystem applies the entql string predicate on the operating_system field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereOperatingSystem(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldOperatingSystem))
|
|
}
|
|
|
|
// WhereBrowserVersion applies the entql string predicate on the browser_version field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereBrowserVersion(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldBrowserVersion))
|
|
}
|
|
|
|
// WhereMobile applies the entql int predicate on the mobile field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereMobile(p entql.IntP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldMobile))
|
|
}
|
|
|
|
// WhereBot applies the entql int predicate on the bot field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereBot(p entql.IntP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldBot))
|
|
}
|
|
|
|
// WhereMozilla applies the entql string predicate on the mozilla field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereMozilla(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldMozilla))
|
|
}
|
|
|
|
// WherePlatform applies the entql string predicate on the platform field.
|
|
func (f *ScaAuthUserDeviceFilter) WherePlatform(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldPlatform))
|
|
}
|
|
|
|
// WhereEngineName applies the entql string predicate on the engine_name field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereEngineName(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldEngineName))
|
|
}
|
|
|
|
// WhereEngineVersion applies the entql string predicate on the engine_version field.
|
|
func (f *ScaAuthUserDeviceFilter) WhereEngineVersion(p entql.StringP) {
|
|
f.Where(p.Field(scaauthuserdevice.FieldEngineVersion))
|
|
}
|
|
|
|
// WhereHasScaAuthUser applies a predicate to check if query has an edge sca_auth_user.
|
|
func (f *ScaAuthUserDeviceFilter) WhereHasScaAuthUser() {
|
|
f.Where(entql.HasEdge("sca_auth_user"))
|
|
}
|
|
|
|
// WhereHasScaAuthUserWith applies a predicate to check if query has an edge sca_auth_user with a given conditions (other predicates).
|
|
func (f *ScaAuthUserDeviceFilter) WhereHasScaAuthUserWith(preds ...predicate.ScaAuthUser) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_user", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (sausq *ScaAuthUserSocialQuery) addPredicate(pred func(s *sql.Selector)) {
|
|
sausq.predicates = append(sausq.predicates, pred)
|
|
}
|
|
|
|
// Filter returns a Filter implementation to apply filters on the ScaAuthUserSocialQuery builder.
|
|
func (sausq *ScaAuthUserSocialQuery) Filter() *ScaAuthUserSocialFilter {
|
|
return &ScaAuthUserSocialFilter{config: sausq.config, predicateAdder: sausq}
|
|
}
|
|
|
|
// addPredicate implements the predicateAdder interface.
|
|
func (m *ScaAuthUserSocialMutation) addPredicate(pred func(s *sql.Selector)) {
|
|
m.predicates = append(m.predicates, pred)
|
|
}
|
|
|
|
// Filter returns an entql.Where implementation to apply filters on the ScaAuthUserSocialMutation builder.
|
|
func (m *ScaAuthUserSocialMutation) Filter() *ScaAuthUserSocialFilter {
|
|
return &ScaAuthUserSocialFilter{config: m.config, predicateAdder: m}
|
|
}
|
|
|
|
// ScaAuthUserSocialFilter provides a generic filtering capability at runtime for ScaAuthUserSocialQuery.
|
|
type ScaAuthUserSocialFilter struct {
|
|
predicateAdder
|
|
config
|
|
}
|
|
|
|
// Where applies the entql predicate on the query filter.
|
|
func (f *ScaAuthUserSocialFilter) Where(p entql.P) {
|
|
f.addPredicate(func(s *sql.Selector) {
|
|
if err := schemaGraph.EvalP(schemaGraph.Nodes[4].Type, p, s); err != nil {
|
|
s.AddError(err)
|
|
}
|
|
})
|
|
}
|
|
|
|
// WhereID applies the entql int64 predicate on the id field.
|
|
func (f *ScaAuthUserSocialFilter) WhereID(p entql.Int64P) {
|
|
f.Where(p.Field(scaauthusersocial.FieldID))
|
|
}
|
|
|
|
// WhereCreatedAt applies the entql time.Time predicate on the created_at field.
|
|
func (f *ScaAuthUserSocialFilter) WhereCreatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldCreatedAt))
|
|
}
|
|
|
|
// WhereUpdatedAt applies the entql time.Time predicate on the updated_at field.
|
|
func (f *ScaAuthUserSocialFilter) WhereUpdatedAt(p entql.TimeP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldUpdatedAt))
|
|
}
|
|
|
|
// WhereDeleted applies the entql int8 predicate on the deleted field.
|
|
func (f *ScaAuthUserSocialFilter) WhereDeleted(p entql.Int8P) {
|
|
f.Where(p.Field(scaauthusersocial.FieldDeleted))
|
|
}
|
|
|
|
// WhereUserID applies the entql string predicate on the user_id field.
|
|
func (f *ScaAuthUserSocialFilter) WhereUserID(p entql.StringP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldUserID))
|
|
}
|
|
|
|
// WhereOpenID applies the entql string predicate on the open_id field.
|
|
func (f *ScaAuthUserSocialFilter) WhereOpenID(p entql.StringP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldOpenID))
|
|
}
|
|
|
|
// WhereSource applies the entql string predicate on the source field.
|
|
func (f *ScaAuthUserSocialFilter) WhereSource(p entql.StringP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldSource))
|
|
}
|
|
|
|
// WhereStatus applies the entql int predicate on the status field.
|
|
func (f *ScaAuthUserSocialFilter) WhereStatus(p entql.IntP) {
|
|
f.Where(p.Field(scaauthusersocial.FieldStatus))
|
|
}
|
|
|
|
// WhereHasScaAuthUser applies a predicate to check if query has an edge sca_auth_user.
|
|
func (f *ScaAuthUserSocialFilter) WhereHasScaAuthUser() {
|
|
f.Where(entql.HasEdge("sca_auth_user"))
|
|
}
|
|
|
|
// WhereHasScaAuthUserWith applies a predicate to check if query has an edge sca_auth_user with a given conditions (other predicates).
|
|
func (f *ScaAuthUserSocialFilter) WhereHasScaAuthUserWith(preds ...predicate.ScaAuthUser) {
|
|
f.Where(entql.HasEdgeWith("sca_auth_user", sqlgraph.WrapFunc(func(s *sql.Selector) {
|
|
for _, p := range preds {
|
|
p(s)
|
|
}
|
|
})))
|
|
}
|