mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-26 12:30:27 +00:00
gen: ent code
This commit is contained in:
parent
b491ff9ec1
commit
791d6979b6
23 changed files with 3621 additions and 144 deletions
|
@ -381,6 +381,16 @@ func IsSuperuserNEQ(v bool) predicate.User {
|
|||
return predicate.User(sql.FieldNEQ(FieldIsSuperuser, v))
|
||||
}
|
||||
|
||||
// SuperuserEQ applies the EQ predicate on the "superuser" field.
|
||||
func SuperuserEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldSuperuser, v))
|
||||
}
|
||||
|
||||
// SuperuserNEQ applies the NEQ predicate on the "superuser" field.
|
||||
func SuperuserNEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldSuperuser, v))
|
||||
}
|
||||
|
||||
// RoleEQ applies the EQ predicate on the "role" field.
|
||||
func RoleEQ(v Role) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldRole, v))
|
||||
|
@ -401,16 +411,6 @@ func RoleNotIn(vs ...Role) predicate.User {
|
|||
return predicate.User(sql.FieldNotIn(FieldRole, vs...))
|
||||
}
|
||||
|
||||
// SuperuserEQ applies the EQ predicate on the "superuser" field.
|
||||
func SuperuserEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldSuperuser, v))
|
||||
}
|
||||
|
||||
// SuperuserNEQ applies the NEQ predicate on the "superuser" field.
|
||||
func SuperuserNEQ(v bool) predicate.User {
|
||||
return predicate.User(sql.FieldNEQ(FieldSuperuser, v))
|
||||
}
|
||||
|
||||
// ActivatedOnEQ applies the EQ predicate on the "activated_on" field.
|
||||
func ActivatedOnEQ(v time.Time) predicate.User {
|
||||
return predicate.User(sql.FieldEQ(FieldActivatedOn, v))
|
||||
|
@ -515,6 +515,33 @@ func HasAuthTokensWith(preds ...predicate.AuthTokens) predicate.User {
|
|||
})
|
||||
}
|
||||
|
||||
// HasNotifiers applies the HasEdge predicate on the "notifiers" edge.
|
||||
func HasNotifiers() predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, NotifiersTable, NotifiersColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasNotifiersWith applies the HasEdge predicate on the "notifiers" edge with a given conditions (other predicates).
|
||||
func HasNotifiersWith(preds ...predicate.Notifier) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(NotifiersInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, NotifiersTable, NotifiersColumn),
|
||||
)
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue