// Code generated by ent, DO NOT EDIT. package user import ( "time" "entgo.io/ent/dialect/sql" "entgo.io/ent/dialect/sql/sqlgraph" "git.noahlan.cn/n-admin/n-admin-server/rpc/core/ent/predicate" "git.noahlan.cn/noahlan/ntool-biz/core/orm/nent/types" ) // ID filters vertices based on their ID field. func ID(id int64) predicate.User { return predicate.User(sql.FieldEQ(FieldID, id)) } // IDEQ applies the EQ predicate on the ID field. func IDEQ(id int64) predicate.User { return predicate.User(sql.FieldEQ(FieldID, id)) } // IDNEQ applies the NEQ predicate on the ID field. func IDNEQ(id int64) predicate.User { return predicate.User(sql.FieldNEQ(FieldID, id)) } // IDIn applies the In predicate on the ID field. func IDIn(ids ...int64) predicate.User { return predicate.User(sql.FieldIn(FieldID, ids...)) } // IDNotIn applies the NotIn predicate on the ID field. func IDNotIn(ids ...int64) predicate.User { return predicate.User(sql.FieldNotIn(FieldID, ids...)) } // IDGT applies the GT predicate on the ID field. func IDGT(id int64) predicate.User { return predicate.User(sql.FieldGT(FieldID, id)) } // IDGTE applies the GTE predicate on the ID field. func IDGTE(id int64) predicate.User { return predicate.User(sql.FieldGTE(FieldID, id)) } // IDLT applies the LT predicate on the ID field. func IDLT(id int64) predicate.User { return predicate.User(sql.FieldLT(FieldID, id)) } // IDLTE applies the LTE predicate on the ID field. func IDLTE(id int64) predicate.User { return predicate.User(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.User { return predicate.User(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.User { return predicate.User(sql.FieldEQ(FieldUpdatedAt, v)) } // Version applies equality check predicate on the "version" field. It's identical to VersionEQ. func Version(v int64) predicate.User { return predicate.User(sql.FieldEQ(FieldVersion, v)) } // DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ. func DeletedAt(v time.Time) predicate.User { return predicate.User(sql.FieldEQ(FieldDeletedAt, v)) } // Username applies equality check predicate on the "username" field. It's identical to UsernameEQ. func Username(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldUsername, v)) } // PhoneNumber applies equality check predicate on the "phone_number" field. It's identical to PhoneNumberEQ. func PhoneNumber(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldPhoneNumber, v)) } // Email applies equality check predicate on the "email" field. It's identical to EmailEQ. func Email(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldEmail, v)) } // Password applies equality check predicate on the "password" field. It's identical to PasswordEQ. func Password(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldPassword, v)) } // Nickname applies equality check predicate on the "nickname" field. It's identical to NicknameEQ. func Nickname(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldNickname, v)) } // StatusEQ applies the EQ predicate on the "status" field. func StatusEQ(v types.Status) predicate.User { vc := v return predicate.User(sql.FieldEQ(FieldStatus, vc)) } // StatusNEQ applies the NEQ predicate on the "status" field. func StatusNEQ(v types.Status) predicate.User { vc := v return predicate.User(sql.FieldNEQ(FieldStatus, vc)) } // StatusIn applies the In predicate on the "status" field. func StatusIn(vs ...types.Status) predicate.User { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.User(sql.FieldIn(FieldStatus, v...)) } // StatusNotIn applies the NotIn predicate on the "status" field. func StatusNotIn(vs ...types.Status) predicate.User { v := make([]any, len(vs)) for i := range v { v[i] = vs[i] } return predicate.User(sql.FieldNotIn(FieldStatus, v...)) } // CreatedAtEQ applies the EQ predicate on the "created_at" field. func CreatedAtEQ(v time.Time) predicate.User { return predicate.User(sql.FieldEQ(FieldCreatedAt, v)) } // CreatedAtNEQ applies the NEQ predicate on the "created_at" field. func CreatedAtNEQ(v time.Time) predicate.User { return predicate.User(sql.FieldNEQ(FieldCreatedAt, v)) } // CreatedAtIn applies the In predicate on the "created_at" field. func CreatedAtIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldIn(FieldCreatedAt, vs...)) } // CreatedAtNotIn applies the NotIn predicate on the "created_at" field. func CreatedAtNotIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldNotIn(FieldCreatedAt, vs...)) } // CreatedAtGT applies the GT predicate on the "created_at" field. func CreatedAtGT(v time.Time) predicate.User { return predicate.User(sql.FieldGT(FieldCreatedAt, v)) } // CreatedAtGTE applies the GTE predicate on the "created_at" field. func CreatedAtGTE(v time.Time) predicate.User { return predicate.User(sql.FieldGTE(FieldCreatedAt, v)) } // CreatedAtLT applies the LT predicate on the "created_at" field. func CreatedAtLT(v time.Time) predicate.User { return predicate.User(sql.FieldLT(FieldCreatedAt, v)) } // CreatedAtLTE applies the LTE predicate on the "created_at" field. func CreatedAtLTE(v time.Time) predicate.User { return predicate.User(sql.FieldLTE(FieldCreatedAt, v)) } // UpdatedAtEQ applies the EQ predicate on the "updated_at" field. func UpdatedAtEQ(v time.Time) predicate.User { return predicate.User(sql.FieldEQ(FieldUpdatedAt, v)) } // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field. func UpdatedAtNEQ(v time.Time) predicate.User { return predicate.User(sql.FieldNEQ(FieldUpdatedAt, v)) } // UpdatedAtIn applies the In predicate on the "updated_at" field. func UpdatedAtIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldIn(FieldUpdatedAt, vs...)) } // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field. func UpdatedAtNotIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldNotIn(FieldUpdatedAt, vs...)) } // UpdatedAtGT applies the GT predicate on the "updated_at" field. func UpdatedAtGT(v time.Time) predicate.User { return predicate.User(sql.FieldGT(FieldUpdatedAt, v)) } // UpdatedAtGTE applies the GTE predicate on the "updated_at" field. func UpdatedAtGTE(v time.Time) predicate.User { return predicate.User(sql.FieldGTE(FieldUpdatedAt, v)) } // UpdatedAtLT applies the LT predicate on the "updated_at" field. func UpdatedAtLT(v time.Time) predicate.User { return predicate.User(sql.FieldLT(FieldUpdatedAt, v)) } // UpdatedAtLTE applies the LTE predicate on the "updated_at" field. func UpdatedAtLTE(v time.Time) predicate.User { return predicate.User(sql.FieldLTE(FieldUpdatedAt, v)) } // VersionEQ applies the EQ predicate on the "version" field. func VersionEQ(v int64) predicate.User { return predicate.User(sql.FieldEQ(FieldVersion, v)) } // VersionNEQ applies the NEQ predicate on the "version" field. func VersionNEQ(v int64) predicate.User { return predicate.User(sql.FieldNEQ(FieldVersion, v)) } // VersionIn applies the In predicate on the "version" field. func VersionIn(vs ...int64) predicate.User { return predicate.User(sql.FieldIn(FieldVersion, vs...)) } // VersionNotIn applies the NotIn predicate on the "version" field. func VersionNotIn(vs ...int64) predicate.User { return predicate.User(sql.FieldNotIn(FieldVersion, vs...)) } // VersionGT applies the GT predicate on the "version" field. func VersionGT(v int64) predicate.User { return predicate.User(sql.FieldGT(FieldVersion, v)) } // VersionGTE applies the GTE predicate on the "version" field. func VersionGTE(v int64) predicate.User { return predicate.User(sql.FieldGTE(FieldVersion, v)) } // VersionLT applies the LT predicate on the "version" field. func VersionLT(v int64) predicate.User { return predicate.User(sql.FieldLT(FieldVersion, v)) } // VersionLTE applies the LTE predicate on the "version" field. func VersionLTE(v int64) predicate.User { return predicate.User(sql.FieldLTE(FieldVersion, v)) } // DeletedAtEQ applies the EQ predicate on the "deleted_at" field. func DeletedAtEQ(v time.Time) predicate.User { return predicate.User(sql.FieldEQ(FieldDeletedAt, v)) } // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field. func DeletedAtNEQ(v time.Time) predicate.User { return predicate.User(sql.FieldNEQ(FieldDeletedAt, v)) } // DeletedAtIn applies the In predicate on the "deleted_at" field. func DeletedAtIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldIn(FieldDeletedAt, vs...)) } // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field. func DeletedAtNotIn(vs ...time.Time) predicate.User { return predicate.User(sql.FieldNotIn(FieldDeletedAt, vs...)) } // DeletedAtGT applies the GT predicate on the "deleted_at" field. func DeletedAtGT(v time.Time) predicate.User { return predicate.User(sql.FieldGT(FieldDeletedAt, v)) } // DeletedAtGTE applies the GTE predicate on the "deleted_at" field. func DeletedAtGTE(v time.Time) predicate.User { return predicate.User(sql.FieldGTE(FieldDeletedAt, v)) } // DeletedAtLT applies the LT predicate on the "deleted_at" field. func DeletedAtLT(v time.Time) predicate.User { return predicate.User(sql.FieldLT(FieldDeletedAt, v)) } // DeletedAtLTE applies the LTE predicate on the "deleted_at" field. func DeletedAtLTE(v time.Time) predicate.User { return predicate.User(sql.FieldLTE(FieldDeletedAt, v)) } // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field. func DeletedAtIsNil() predicate.User { return predicate.User(sql.FieldIsNull(FieldDeletedAt)) } // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field. func DeletedAtNotNil() predicate.User { return predicate.User(sql.FieldNotNull(FieldDeletedAt)) } // UsernameEQ applies the EQ predicate on the "username" field. func UsernameEQ(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldUsername, v)) } // UsernameNEQ applies the NEQ predicate on the "username" field. func UsernameNEQ(v string) predicate.User { return predicate.User(sql.FieldNEQ(FieldUsername, v)) } // UsernameIn applies the In predicate on the "username" field. func UsernameIn(vs ...string) predicate.User { return predicate.User(sql.FieldIn(FieldUsername, vs...)) } // UsernameNotIn applies the NotIn predicate on the "username" field. func UsernameNotIn(vs ...string) predicate.User { return predicate.User(sql.FieldNotIn(FieldUsername, vs...)) } // UsernameGT applies the GT predicate on the "username" field. func UsernameGT(v string) predicate.User { return predicate.User(sql.FieldGT(FieldUsername, v)) } // UsernameGTE applies the GTE predicate on the "username" field. func UsernameGTE(v string) predicate.User { return predicate.User(sql.FieldGTE(FieldUsername, v)) } // UsernameLT applies the LT predicate on the "username" field. func UsernameLT(v string) predicate.User { return predicate.User(sql.FieldLT(FieldUsername, v)) } // UsernameLTE applies the LTE predicate on the "username" field. func UsernameLTE(v string) predicate.User { return predicate.User(sql.FieldLTE(FieldUsername, v)) } // UsernameContains applies the Contains predicate on the "username" field. func UsernameContains(v string) predicate.User { return predicate.User(sql.FieldContains(FieldUsername, v)) } // UsernameHasPrefix applies the HasPrefix predicate on the "username" field. func UsernameHasPrefix(v string) predicate.User { return predicate.User(sql.FieldHasPrefix(FieldUsername, v)) } // UsernameHasSuffix applies the HasSuffix predicate on the "username" field. func UsernameHasSuffix(v string) predicate.User { return predicate.User(sql.FieldHasSuffix(FieldUsername, v)) } // UsernameEqualFold applies the EqualFold predicate on the "username" field. func UsernameEqualFold(v string) predicate.User { return predicate.User(sql.FieldEqualFold(FieldUsername, v)) } // UsernameContainsFold applies the ContainsFold predicate on the "username" field. func UsernameContainsFold(v string) predicate.User { return predicate.User(sql.FieldContainsFold(FieldUsername, v)) } // PhoneNumberEQ applies the EQ predicate on the "phone_number" field. func PhoneNumberEQ(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldPhoneNumber, v)) } // PhoneNumberNEQ applies the NEQ predicate on the "phone_number" field. func PhoneNumberNEQ(v string) predicate.User { return predicate.User(sql.FieldNEQ(FieldPhoneNumber, v)) } // PhoneNumberIn applies the In predicate on the "phone_number" field. func PhoneNumberIn(vs ...string) predicate.User { return predicate.User(sql.FieldIn(FieldPhoneNumber, vs...)) } // PhoneNumberNotIn applies the NotIn predicate on the "phone_number" field. func PhoneNumberNotIn(vs ...string) predicate.User { return predicate.User(sql.FieldNotIn(FieldPhoneNumber, vs...)) } // PhoneNumberGT applies the GT predicate on the "phone_number" field. func PhoneNumberGT(v string) predicate.User { return predicate.User(sql.FieldGT(FieldPhoneNumber, v)) } // PhoneNumberGTE applies the GTE predicate on the "phone_number" field. func PhoneNumberGTE(v string) predicate.User { return predicate.User(sql.FieldGTE(FieldPhoneNumber, v)) } // PhoneNumberLT applies the LT predicate on the "phone_number" field. func PhoneNumberLT(v string) predicate.User { return predicate.User(sql.FieldLT(FieldPhoneNumber, v)) } // PhoneNumberLTE applies the LTE predicate on the "phone_number" field. func PhoneNumberLTE(v string) predicate.User { return predicate.User(sql.FieldLTE(FieldPhoneNumber, v)) } // PhoneNumberContains applies the Contains predicate on the "phone_number" field. func PhoneNumberContains(v string) predicate.User { return predicate.User(sql.FieldContains(FieldPhoneNumber, v)) } // PhoneNumberHasPrefix applies the HasPrefix predicate on the "phone_number" field. func PhoneNumberHasPrefix(v string) predicate.User { return predicate.User(sql.FieldHasPrefix(FieldPhoneNumber, v)) } // PhoneNumberHasSuffix applies the HasSuffix predicate on the "phone_number" field. func PhoneNumberHasSuffix(v string) predicate.User { return predicate.User(sql.FieldHasSuffix(FieldPhoneNumber, v)) } // PhoneNumberIsNil applies the IsNil predicate on the "phone_number" field. func PhoneNumberIsNil() predicate.User { return predicate.User(sql.FieldIsNull(FieldPhoneNumber)) } // PhoneNumberNotNil applies the NotNil predicate on the "phone_number" field. func PhoneNumberNotNil() predicate.User { return predicate.User(sql.FieldNotNull(FieldPhoneNumber)) } // PhoneNumberEqualFold applies the EqualFold predicate on the "phone_number" field. func PhoneNumberEqualFold(v string) predicate.User { return predicate.User(sql.FieldEqualFold(FieldPhoneNumber, v)) } // PhoneNumberContainsFold applies the ContainsFold predicate on the "phone_number" field. func PhoneNumberContainsFold(v string) predicate.User { return predicate.User(sql.FieldContainsFold(FieldPhoneNumber, v)) } // EmailEQ applies the EQ predicate on the "email" field. func EmailEQ(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldEmail, v)) } // EmailNEQ applies the NEQ predicate on the "email" field. func EmailNEQ(v string) predicate.User { return predicate.User(sql.FieldNEQ(FieldEmail, v)) } // EmailIn applies the In predicate on the "email" field. func EmailIn(vs ...string) predicate.User { return predicate.User(sql.FieldIn(FieldEmail, vs...)) } // EmailNotIn applies the NotIn predicate on the "email" field. func EmailNotIn(vs ...string) predicate.User { return predicate.User(sql.FieldNotIn(FieldEmail, vs...)) } // EmailGT applies the GT predicate on the "email" field. func EmailGT(v string) predicate.User { return predicate.User(sql.FieldGT(FieldEmail, v)) } // EmailGTE applies the GTE predicate on the "email" field. func EmailGTE(v string) predicate.User { return predicate.User(sql.FieldGTE(FieldEmail, v)) } // EmailLT applies the LT predicate on the "email" field. func EmailLT(v string) predicate.User { return predicate.User(sql.FieldLT(FieldEmail, v)) } // EmailLTE applies the LTE predicate on the "email" field. func EmailLTE(v string) predicate.User { return predicate.User(sql.FieldLTE(FieldEmail, v)) } // EmailContains applies the Contains predicate on the "email" field. func EmailContains(v string) predicate.User { return predicate.User(sql.FieldContains(FieldEmail, v)) } // EmailHasPrefix applies the HasPrefix predicate on the "email" field. func EmailHasPrefix(v string) predicate.User { return predicate.User(sql.FieldHasPrefix(FieldEmail, v)) } // EmailHasSuffix applies the HasSuffix predicate on the "email" field. func EmailHasSuffix(v string) predicate.User { return predicate.User(sql.FieldHasSuffix(FieldEmail, v)) } // EmailIsNil applies the IsNil predicate on the "email" field. func EmailIsNil() predicate.User { return predicate.User(sql.FieldIsNull(FieldEmail)) } // EmailNotNil applies the NotNil predicate on the "email" field. func EmailNotNil() predicate.User { return predicate.User(sql.FieldNotNull(FieldEmail)) } // EmailEqualFold applies the EqualFold predicate on the "email" field. func EmailEqualFold(v string) predicate.User { return predicate.User(sql.FieldEqualFold(FieldEmail, v)) } // EmailContainsFold applies the ContainsFold predicate on the "email" field. func EmailContainsFold(v string) predicate.User { return predicate.User(sql.FieldContainsFold(FieldEmail, v)) } // PasswordEQ applies the EQ predicate on the "password" field. func PasswordEQ(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldPassword, v)) } // PasswordNEQ applies the NEQ predicate on the "password" field. func PasswordNEQ(v string) predicate.User { return predicate.User(sql.FieldNEQ(FieldPassword, v)) } // PasswordIn applies the In predicate on the "password" field. func PasswordIn(vs ...string) predicate.User { return predicate.User(sql.FieldIn(FieldPassword, vs...)) } // PasswordNotIn applies the NotIn predicate on the "password" field. func PasswordNotIn(vs ...string) predicate.User { return predicate.User(sql.FieldNotIn(FieldPassword, vs...)) } // PasswordGT applies the GT predicate on the "password" field. func PasswordGT(v string) predicate.User { return predicate.User(sql.FieldGT(FieldPassword, v)) } // PasswordGTE applies the GTE predicate on the "password" field. func PasswordGTE(v string) predicate.User { return predicate.User(sql.FieldGTE(FieldPassword, v)) } // PasswordLT applies the LT predicate on the "password" field. func PasswordLT(v string) predicate.User { return predicate.User(sql.FieldLT(FieldPassword, v)) } // PasswordLTE applies the LTE predicate on the "password" field. func PasswordLTE(v string) predicate.User { return predicate.User(sql.FieldLTE(FieldPassword, v)) } // PasswordContains applies the Contains predicate on the "password" field. func PasswordContains(v string) predicate.User { return predicate.User(sql.FieldContains(FieldPassword, v)) } // PasswordHasPrefix applies the HasPrefix predicate on the "password" field. func PasswordHasPrefix(v string) predicate.User { return predicate.User(sql.FieldHasPrefix(FieldPassword, v)) } // PasswordHasSuffix applies the HasSuffix predicate on the "password" field. func PasswordHasSuffix(v string) predicate.User { return predicate.User(sql.FieldHasSuffix(FieldPassword, v)) } // PasswordEqualFold applies the EqualFold predicate on the "password" field. func PasswordEqualFold(v string) predicate.User { return predicate.User(sql.FieldEqualFold(FieldPassword, v)) } // PasswordContainsFold applies the ContainsFold predicate on the "password" field. func PasswordContainsFold(v string) predicate.User { return predicate.User(sql.FieldContainsFold(FieldPassword, v)) } // NicknameEQ applies the EQ predicate on the "nickname" field. func NicknameEQ(v string) predicate.User { return predicate.User(sql.FieldEQ(FieldNickname, v)) } // NicknameNEQ applies the NEQ predicate on the "nickname" field. func NicknameNEQ(v string) predicate.User { return predicate.User(sql.FieldNEQ(FieldNickname, v)) } // NicknameIn applies the In predicate on the "nickname" field. func NicknameIn(vs ...string) predicate.User { return predicate.User(sql.FieldIn(FieldNickname, vs...)) } // NicknameNotIn applies the NotIn predicate on the "nickname" field. func NicknameNotIn(vs ...string) predicate.User { return predicate.User(sql.FieldNotIn(FieldNickname, vs...)) } // NicknameGT applies the GT predicate on the "nickname" field. func NicknameGT(v string) predicate.User { return predicate.User(sql.FieldGT(FieldNickname, v)) } // NicknameGTE applies the GTE predicate on the "nickname" field. func NicknameGTE(v string) predicate.User { return predicate.User(sql.FieldGTE(FieldNickname, v)) } // NicknameLT applies the LT predicate on the "nickname" field. func NicknameLT(v string) predicate.User { return predicate.User(sql.FieldLT(FieldNickname, v)) } // NicknameLTE applies the LTE predicate on the "nickname" field. func NicknameLTE(v string) predicate.User { return predicate.User(sql.FieldLTE(FieldNickname, v)) } // NicknameContains applies the Contains predicate on the "nickname" field. func NicknameContains(v string) predicate.User { return predicate.User(sql.FieldContains(FieldNickname, v)) } // NicknameHasPrefix applies the HasPrefix predicate on the "nickname" field. func NicknameHasPrefix(v string) predicate.User { return predicate.User(sql.FieldHasPrefix(FieldNickname, v)) } // NicknameHasSuffix applies the HasSuffix predicate on the "nickname" field. func NicknameHasSuffix(v string) predicate.User { return predicate.User(sql.FieldHasSuffix(FieldNickname, v)) } // NicknameIsNil applies the IsNil predicate on the "nickname" field. func NicknameIsNil() predicate.User { return predicate.User(sql.FieldIsNull(FieldNickname)) } // NicknameNotNil applies the NotNil predicate on the "nickname" field. func NicknameNotNil() predicate.User { return predicate.User(sql.FieldNotNull(FieldNickname)) } // NicknameEqualFold applies the EqualFold predicate on the "nickname" field. func NicknameEqualFold(v string) predicate.User { return predicate.User(sql.FieldEqualFold(FieldNickname, v)) } // NicknameContainsFold applies the ContainsFold predicate on the "nickname" field. func NicknameContainsFold(v string) predicate.User { return predicate.User(sql.FieldContainsFold(FieldNickname, v)) } // HasMetas applies the HasEdge predicate on the "metas" edge. func HasMetas() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, MetasTable, MetasColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasMetasWith applies the HasEdge predicate on the "metas" edge with a given conditions (other predicates). func HasMetasWith(preds ...predicate.UserMeta) predicate.User { return predicate.User(func(s *sql.Selector) { step := newMetasStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasRoles applies the HasEdge predicate on the "roles" edge. func HasRoles() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.M2M, false, RolesTable, RolesPrimaryKey...), ) sqlgraph.HasNeighbors(s, step) }) } // HasRolesWith applies the HasEdge predicate on the "roles" edge with a given conditions (other predicates). func HasRolesWith(preds ...predicate.Role) predicate.User { return predicate.User(func(s *sql.Selector) { step := newRolesStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasSocials applies the HasEdge predicate on the "socials" edge. func HasSocials() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, SocialsTable, SocialsColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasSocialsWith applies the HasEdge predicate on the "socials" edge with a given conditions (other predicates). func HasSocialsWith(preds ...predicate.UserSocial) predicate.User { return predicate.User(func(s *sql.Selector) { step := newSocialsStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasDepartments applies the HasEdge predicate on the "departments" edge. func HasDepartments() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, DepartmentsTable, DepartmentsColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasDepartmentsWith applies the HasEdge predicate on the "departments" edge with a given conditions (other predicates). func HasDepartmentsWith(preds ...predicate.Department) predicate.User { return predicate.User(func(s *sql.Selector) { step := newDepartmentsStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasToken applies the HasEdge predicate on the "token" edge. func HasToken() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2M, false, TokenTable, TokenColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasTokenWith applies the HasEdge predicate on the "token" edge with a given conditions (other predicates). func HasTokenWith(preds ...predicate.Token) predicate.User { return predicate.User(func(s *sql.Selector) { step := newTokenStep() sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) { for _, p := range preds { p(s) } }) }) } // HasLoginRecord applies the HasEdge predicate on the "loginRecord" edge. func HasLoginRecord() predicate.User { return predicate.User(func(s *sql.Selector) { step := sqlgraph.NewStep( sqlgraph.From(Table, FieldID), sqlgraph.Edge(sqlgraph.O2O, false, LoginRecordTable, LoginRecordColumn), ) sqlgraph.HasNeighbors(s, step) }) } // HasLoginRecordWith applies the HasEdge predicate on the "loginRecord" edge with a given conditions (other predicates). func HasLoginRecordWith(preds ...predicate.LoginRecord) predicate.User { return predicate.User(func(s *sql.Selector) { step := newLoginRecordStep() 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.User) predicate.User { return predicate.User(func(s *sql.Selector) { s1 := s.Clone().SetP(nil) for _, p := range predicates { p(s1) } s.Where(s1.P()) }) } // Or groups predicates with the OR operator between them. func Or(predicates ...predicate.User) predicate.User { return predicate.User(func(s *sql.Selector) { s1 := s.Clone().SetP(nil) for i, p := range predicates { if i > 0 { s1.Or() } p(s1) } s.Where(s1.P()) }) } // Not applies the not operator on the given predicate. func Not(p predicate.User) predicate.User { return predicate.User(func(s *sql.Selector) { p(s.Not()) }) }