Added user email verification support.
This commit is contained in:
parent
feb11bbe5b
commit
ea46a38f68
31 changed files with 417 additions and 85 deletions
|
|
@ -5,10 +5,9 @@ package user
|
|||
import (
|
||||
"time"
|
||||
|
||||
"github.com/mikestefanello/pagoda/ent/predicate"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"entgo.io/ent/dialect/sql/sqlgraph"
|
||||
"github.com/mikestefanello/pagoda/ent/predicate"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
|
|
@ -115,6 +114,13 @@ func Password(v string) predicate.User {
|
|||
})
|
||||
}
|
||||
|
||||
// Verified applies equality check predicate on the "verified" field. It's identical to VerifiedEQ.
|
||||
func Verified(v bool) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldVerified), v))
|
||||
})
|
||||
}
|
||||
|
||||
// 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(func(s *sql.Selector) {
|
||||
|
|
@ -455,6 +461,20 @@ func PasswordContainsFold(v string) predicate.User {
|
|||
})
|
||||
}
|
||||
|
||||
// VerifiedEQ applies the EQ predicate on the "verified" field.
|
||||
func VerifiedEQ(v bool) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
s.Where(sql.EQ(s.C(FieldVerified), v))
|
||||
})
|
||||
}
|
||||
|
||||
// VerifiedNEQ applies the NEQ predicate on the "verified" field.
|
||||
func VerifiedNEQ(v bool) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
s.Where(sql.NEQ(s.C(FieldVerified), v))
|
||||
})
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v time.Time) predicate.User {
|
||||
return predicate.User(func(s *sql.Selector) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue